1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tests: fix diff.color_compare_strings parameter order in test files, to make analysing the results easier

This commit is contained in:
Delyan Angelov 2023-07-29 16:41:02 +03:00
parent 112a1278bb
commit 1c2b4e76dc
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
4 changed files with 5 additions and 5 deletions

View File

@ -71,7 +71,7 @@ fn print_compare(expected string, found string) {
println(found) println(found)
println('============\n') println('============\n')
println('diff:') println('diff:')
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected)) println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
println('============\n') println('============\n')
} }

View File

@ -52,7 +52,7 @@ fn check_path(vexe string, dir string, tests []string) int {
println(found) println(found)
println('============\n') println('============\n')
println('diff:') println('diff:')
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected)) println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
println('============\n') println('============\n')
nb_fail++ nb_fail++
} else { } else {

View File

@ -362,10 +362,10 @@ fn clean_line_endings(s string) string {
return res return res
} }
fn diff_content(s1 string, s2 string) { fn diff_content(expected string, found string) {
diff_cmd := diff.find_working_diff_command() or { return } diff_cmd := diff.find_working_diff_command() or { return }
println(term.bold(term.yellow('diff: '))) println(term.bold(term.yellow('diff: ')))
println(diff.color_compare_strings(diff_cmd, rand.ulid(), s1, s2)) println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
println('============\n') println('============\n')
} }

View File

@ -84,7 +84,7 @@ fn check_path(dir string, tests []string) !int {
println(found) println(found)
println('============\n') println('============\n')
println('diff:') println('diff:')
println(diff.color_compare_strings(diff_cmd, rand.ulid(), found, expected)) println(diff.color_compare_strings(diff_cmd, rand.ulid(), expected, found))
println('============\n') println('============\n')
nb_fail++ nb_fail++
} else { } else {