diff --git a/vlib/v/preludes/test_runner_normal.v b/vlib/v/preludes/test_runner_normal.v index dee277b187384d..36bd763d650991 100644 --- a/vlib/v/preludes/test_runner_normal.v +++ b/vlib/v/preludes/test_runner_normal.v @@ -131,10 +131,10 @@ fn (mut runner NormalTestRunner) assert_fail(i &VAssertMetaInfo) { } eprintln('${final_filepath} ${final_funcname}') if i.op.len > 0 && i.op != 'call' { - mut lvtitle := ' Left value:' - mut rvtitle := ' Right value:' - mut slvalue := '${i.lvalue}' - mut srvalue := '${i.rvalue}' + mut lvtitle := ' Left value (len: ${i.lvalue.len}):' + mut rvtitle := ' Right value (len: ${i.rvalue.len}):' + mut slvalue := '`${i.lvalue}`' + mut srvalue := '`${i.rvalue}`' // Do not print duplicate values to avoid confusion. In mosts tests the developer does // `assert foo() == [1, 2, 3]` // There's no need to print "[1, 2, 3]" again (left: [1,2,3,4] right:[1,2,3]) diff --git a/vlib/v/tests/skip_unused/assert_with_extra_message_works_test.run.out b/vlib/v/tests/skip_unused/assert_with_extra_message_works_test.run.out index 550a59ba75fe1f..4b4d1f7e1a85ad 100644 --- a/vlib/v/tests/skip_unused/assert_with_extra_message_works_test.run.out +++ b/vlib/v/tests/skip_unused/assert_with_extra_message_works_test.run.out @@ -1,6 +1,6 @@ vlib/v/tests/skip_unused/assert_with_extra_message_works_test.vv:7: fn test_interpolation_with_assert_that_has_extra_message > assert 'abc$i' != 'abc77', my_failure_message(i) - Left value: abc77 - Right value: abc77 + Left value (len: 5): `abc77` + Right value (len: 5): `abc77` Message: the assert failed :-|, i: 77 diff --git a/vlib/v/tests/skip_unused/assert_with_extra_message_works_test.skip_unused.run.out b/vlib/v/tests/skip_unused/assert_with_extra_message_works_test.skip_unused.run.out index 550a59ba75fe1f..4b4d1f7e1a85ad 100644 --- a/vlib/v/tests/skip_unused/assert_with_extra_message_works_test.skip_unused.run.out +++ b/vlib/v/tests/skip_unused/assert_with_extra_message_works_test.skip_unused.run.out @@ -1,6 +1,6 @@ vlib/v/tests/skip_unused/assert_with_extra_message_works_test.vv:7: fn test_interpolation_with_assert_that_has_extra_message > assert 'abc$i' != 'abc77', my_failure_message(i) - Left value: abc77 - Right value: abc77 + Left value (len: 5): `abc77` + Right value (len: 5): `abc77` Message: the assert failed :-|, i: 77 diff --git a/vlib/v/tests/skip_unused/assert_works_test.run.out b/vlib/v/tests/skip_unused/assert_works_test.run.out index bf4097ed62687b..a82e60325ae559 100644 --- a/vlib/v/tests/skip_unused/assert_works_test.run.out +++ b/vlib/v/tests/skip_unused/assert_works_test.run.out @@ -1,5 +1,5 @@ vlib/v/tests/skip_unused/assert_works_test.vv:2: fn test_abc > assert 'abc' == 'xyz' - Left value: abc - Right value: xyz + Left value (len: 3): `abc` + Right value (len: 3): `xyz` diff --git a/vlib/v/tests/skip_unused/assert_works_test.skip_unused.run.out b/vlib/v/tests/skip_unused/assert_works_test.skip_unused.run.out index bf4097ed62687b..a82e60325ae559 100644 --- a/vlib/v/tests/skip_unused/assert_works_test.skip_unused.run.out +++ b/vlib/v/tests/skip_unused/assert_works_test.skip_unused.run.out @@ -1,5 +1,5 @@ vlib/v/tests/skip_unused/assert_works_test.vv:2: fn test_abc > assert 'abc' == 'xyz' - Left value: abc - Right value: xyz + Left value (len: 3): `abc` + Right value (len: 3): `xyz`