Skip to content

Commit 1c2b4e7

Browse files
committed
tests: fix diff.color_compare_strings parameter order in test files, to make analysing the results easier
1 parent 112a127 commit 1c2b4e7

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

cmd/tools/vdoc/tests/vdoc_file_test.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn print_compare(expected string, found string) {
7171
println(found)
7272
println('============\n')
7373
println('diff:')
74-
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected))
74+
println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
7575
println('============\n')
7676
}
7777

cmd/tools/vvet/vet_test.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn check_path(vexe string, dir string, tests []string) int {
5252
println(found)
5353
println('============\n')
5454
println('diff:')
55-
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected))
55+
println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
5656
println('============\n')
5757
nb_fail++
5858
} else {

vlib/v/compiler_errors_test.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,10 @@ fn clean_line_endings(s string) string {
362362
return res
363363
}
364364

365-
fn diff_content(s1 string, s2 string) {
365+
fn diff_content(expected string, found string) {
366366
diff_cmd := diff.find_working_diff_command() or { return }
367367
println(term.bold(term.yellow('diff: ')))
368-
println(diff.color_compare_strings(diff_cmd, rand.ulid(), s1, s2))
368+
println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
369369
println('============\n')
370370
}
371371

vlib/v/gen/js/program_test.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn check_path(dir string, tests []string) !int {
8484
println(found)
8585
println('============\n')
8686
println('diff:')
87-
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected))
87+
println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
8888
println('============\n')
8989
nb_fail++
9090
} else {

0 commit comments

Comments
 (0)