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:
parent
112a1278bb
commit
1c2b4e76dc
@ -71,7 +71,7 @@ fn print_compare(expected string, found string) {
|
||||
println(found)
|
||||
println('============\n')
|
||||
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')
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ fn check_path(vexe string, dir string, tests []string) int {
|
||||
println(found)
|
||||
println('============\n')
|
||||
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')
|
||||
nb_fail++
|
||||
} else {
|
||||
|
@ -362,10 +362,10 @@ fn clean_line_endings(s string) string {
|
||||
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 }
|
||||
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')
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ fn check_path(dir string, tests []string) !int {
|
||||
println(found)
|
||||
println('============\n')
|
||||
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')
|
||||
nb_fail++
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user