diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-12-06 12:47:32 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-07 07:25:15 +0900 |
| commit | d5e4aef3586c07c31e3e4d76ce7fdf0f9843314f (patch) | |
| tree | 5477b82e8ace04f4ea6c450afc19adeb8f465f5a /t/unit-tests/clar/test/expected | |
| parent | 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff) | |
| download | git-d5e4aef3586c07c31e3e4d76ce7fdf0f9843314f.tar.xz | |
t/unit-tests: update clar to 39f11fe
Update clar to commit 39f11fe (Merge pull request #131 from
pks-gitlab/pks-integer-double-evaluation, 2025-12-05). This commit
includes the following changes relevant to Git:
- There are now typesafe integer comparison functions. Furthermore,
the range of comparison functions has been included to also have
relative comparisons, like "greater than".
- There is a new `cl_failf()` macro that allows the caller to specify
an error message with formatting directives.
- The TAP format has been fixed to correctly terminate YAML blocks
with "...\n" instead of "---\n".
Note that we already had a `cl_failf()` function declared in our own
sources. This function is equivalent to the upstreamed function, so we
can simply drop it now.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/clar/test/expected')
| -rw-r--r-- | t/unit-tests/clar/test/expected/quiet | 40 | ||||
| -rw-r--r-- | t/unit-tests/clar/test/expected/summary_with_filename | 42 | ||||
| -rw-r--r-- | t/unit-tests/clar/test/expected/summary_without_filename | 42 | ||||
| -rw-r--r-- | t/unit-tests/clar/test/expected/tap | 88 | ||||
| -rw-r--r-- | t/unit-tests/clar/test/expected/without_arguments | 42 |
5 files changed, 217 insertions, 37 deletions
diff --git a/t/unit-tests/clar/test/expected/quiet b/t/unit-tests/clar/test/expected/quiet index 280c99d8ad..a93273b5a2 100644 --- a/t/unit-tests/clar/test/expected/quiet +++ b/t/unit-tests/clar/test/expected/quiet @@ -18,27 +18,57 @@ combined::strings_with_length [file:42] 5) Failure: combined::int [file:42] - 101 != value ("extra note on failing test") + Expected comparison to hold: 101 == value 101 != 100 6) Failure: +combined::int_note [file:42] + Expected comparison to hold: 101 == value + extra note on failing test + + 7) Failure: combined::int_fmt [file:42] - 022 != value + Expected comparison to hold: 022 == value 0022 != 0144 - 7) Failure: + 8) Failure: combined::bool [file:42] 0 != value 0 != 1 - 8) Failure: + 9) Failure: combined::multiline_description [file:42] Function call failed: -1 description line 1 description line 2 - 9) Failure: + 10) Failure: combined::null_string [file:42] String mismatch: "expected" != actual ("this one fails") 'expected' != NULL + 11) Failure: +combined::failf [file:42] + Test failed. + some reason: foo + + 12) Failure: +combined::compare_i [file:42] + Expected comparison to hold: two < 1 + 2 >= 1 + + 13) Failure: +combined::compare_i_with_format [file:42] + Expected comparison to hold: two < 1 + foo: bar + + 14) Failure: +combined::compare_u [file:42] + Expected comparison to hold: two < 1 + 2 >= 1 + + 15) Failure: +combined::compare_u_with_format [file:42] + Expected comparison to hold: two < 1 + foo: bar + diff --git a/t/unit-tests/clar/test/expected/summary_with_filename b/t/unit-tests/clar/test/expected/summary_with_filename index 460160791d..a9471cc7d5 100644 --- a/t/unit-tests/clar/test/expected/summary_with_filename +++ b/t/unit-tests/clar/test/expected/summary_with_filename @@ -1,6 +1,6 @@ Loaded 1 suites: Started (test status codes: OK='.' FAILURE='F' SKIPPED='S') -FFFFFFFFF +FFFFFFFFFFFFFFF 1) Failure: combined::1 [file:42] @@ -22,28 +22,58 @@ combined::strings_with_length [file:42] 5) Failure: combined::int [file:42] - 101 != value ("extra note on failing test") + Expected comparison to hold: 101 == value 101 != 100 6) Failure: +combined::int_note [file:42] + Expected comparison to hold: 101 == value + extra note on failing test + + 7) Failure: combined::int_fmt [file:42] - 022 != value + Expected comparison to hold: 022 == value 0022 != 0144 - 7) Failure: + 8) Failure: combined::bool [file:42] 0 != value 0 != 1 - 8) Failure: + 9) Failure: combined::multiline_description [file:42] Function call failed: -1 description line 1 description line 2 - 9) Failure: + 10) Failure: combined::null_string [file:42] String mismatch: "expected" != actual ("this one fails") 'expected' != NULL + 11) Failure: +combined::failf [file:42] + Test failed. + some reason: foo + + 12) Failure: +combined::compare_i [file:42] + Expected comparison to hold: two < 1 + 2 >= 1 + + 13) Failure: +combined::compare_i_with_format [file:42] + Expected comparison to hold: two < 1 + foo: bar + + 14) Failure: +combined::compare_u [file:42] + Expected comparison to hold: two < 1 + 2 >= 1 + + 15) Failure: +combined::compare_u_with_format [file:42] + Expected comparison to hold: two < 1 + foo: bar + written summary file to different.xml diff --git a/t/unit-tests/clar/test/expected/summary_without_filename b/t/unit-tests/clar/test/expected/summary_without_filename index 7874c1d98b..83ba770d00 100644 --- a/t/unit-tests/clar/test/expected/summary_without_filename +++ b/t/unit-tests/clar/test/expected/summary_without_filename @@ -1,6 +1,6 @@ Loaded 1 suites: Started (test status codes: OK='.' FAILURE='F' SKIPPED='S') -FFFFFFFFF +FFFFFFFFFFFFFFF 1) Failure: combined::1 [file:42] @@ -22,28 +22,58 @@ combined::strings_with_length [file:42] 5) Failure: combined::int [file:42] - 101 != value ("extra note on failing test") + Expected comparison to hold: 101 == value 101 != 100 6) Failure: +combined::int_note [file:42] + Expected comparison to hold: 101 == value + extra note on failing test + + 7) Failure: combined::int_fmt [file:42] - 022 != value + Expected comparison to hold: 022 == value 0022 != 0144 - 7) Failure: + 8) Failure: combined::bool [file:42] 0 != value 0 != 1 - 8) Failure: + 9) Failure: combined::multiline_description [file:42] Function call failed: -1 description line 1 description line 2 - 9) Failure: + 10) Failure: combined::null_string [file:42] String mismatch: "expected" != actual ("this one fails") 'expected' != NULL + 11) Failure: +combined::failf [file:42] + Test failed. + some reason: foo + + 12) Failure: +combined::compare_i [file:42] + Expected comparison to hold: two < 1 + 2 >= 1 + + 13) Failure: +combined::compare_i_with_format [file:42] + Expected comparison to hold: two < 1 + foo: bar + + 14) Failure: +combined::compare_u [file:42] + Expected comparison to hold: two < 1 + 2 >= 1 + + 15) Failure: +combined::compare_u_with_format [file:42] + Expected comparison to hold: two < 1 + foo: bar + written summary file to summary.xml diff --git a/t/unit-tests/clar/test/expected/tap b/t/unit-tests/clar/test/expected/tap index bddbd5dfe9..e67118d3ae 100644 --- a/t/unit-tests/clar/test/expected/tap +++ b/t/unit-tests/clar/test/expected/tap @@ -8,7 +8,7 @@ not ok 1 - combined::1 file: 'file' line: 42 function: 'func' - --- + ... not ok 2 - combined::2 --- reason: | @@ -17,7 +17,7 @@ not ok 2 - combined::2 file: 'file' line: 42 function: 'func' - --- + ... not ok 3 - combined::strings --- reason: | @@ -27,7 +27,7 @@ not ok 3 - combined::strings file: 'file' line: 42 function: 'func' - --- + ... not ok 4 - combined::strings_with_length --- reason: | @@ -37,28 +37,38 @@ not ok 4 - combined::strings_with_length file: 'file' line: 42 function: 'func' - --- + ... not ok 5 - combined::int --- reason: | - 101 != value ("extra note on failing test") + Expected comparison to hold: 101 == value 101 != 100 at: file: 'file' line: 42 function: 'func' + ... +not ok 6 - combined::int_note --- -not ok 6 - combined::int_fmt + reason: | + Expected comparison to hold: 101 == value + extra note on failing test + at: + file: 'file' + line: 42 + function: 'func' + ... +not ok 7 - combined::int_fmt --- reason: | - 022 != value + Expected comparison to hold: 022 == value 0022 != 0144 at: file: 'file' line: 42 function: 'func' - --- -not ok 7 - combined::bool + ... +not ok 8 - combined::bool --- reason: | 0 != value @@ -67,8 +77,8 @@ not ok 7 - combined::bool file: 'file' line: 42 function: 'func' - --- -not ok 8 - combined::multiline_description + ... +not ok 9 - combined::multiline_description --- reason: | Function call failed: -1 @@ -78,8 +88,8 @@ not ok 8 - combined::multiline_description file: 'file' line: 42 function: 'func' - --- -not ok 9 - combined::null_string + ... +not ok 10 - combined::null_string --- reason: | String mismatch: "expected" != actual ("this one fails") @@ -88,5 +98,55 @@ not ok 9 - combined::null_string file: 'file' line: 42 function: 'func' + ... +not ok 11 - combined::failf + --- + reason: | + Test failed. + some reason: foo + at: + file: 'file' + line: 42 + function: 'func' + ... +not ok 12 - combined::compare_i --- -1..9 + reason: | + Expected comparison to hold: two < 1 + 2 >= 1 + at: + file: 'file' + line: 42 + function: 'func' + ... +not ok 13 - combined::compare_i_with_format + --- + reason: | + Expected comparison to hold: two < 1 + foo: bar + at: + file: 'file' + line: 42 + function: 'func' + ... +not ok 14 - combined::compare_u + --- + reason: | + Expected comparison to hold: two < 1 + 2 >= 1 + at: + file: 'file' + line: 42 + function: 'func' + ... +not ok 15 - combined::compare_u_with_format + --- + reason: | + Expected comparison to hold: two < 1 + foo: bar + at: + file: 'file' + line: 42 + function: 'func' + ... +1..15 diff --git a/t/unit-tests/clar/test/expected/without_arguments b/t/unit-tests/clar/test/expected/without_arguments index 1111d418a0..9891f45a70 100644 --- a/t/unit-tests/clar/test/expected/without_arguments +++ b/t/unit-tests/clar/test/expected/without_arguments @@ -1,6 +1,6 @@ Loaded 1 suites: Started (test status codes: OK='.' FAILURE='F' SKIPPED='S') -FFFFFFFFF +FFFFFFFFFFFFFFF 1) Failure: combined::1 [file:42] @@ -22,27 +22,57 @@ combined::strings_with_length [file:42] 5) Failure: combined::int [file:42] - 101 != value ("extra note on failing test") + Expected comparison to hold: 101 == value 101 != 100 6) Failure: +combined::int_note [file:42] + Expected comparison to hold: 101 == value + extra note on failing test + + 7) Failure: combined::int_fmt [file:42] - 022 != value + Expected comparison to hold: 022 == value 0022 != 0144 - 7) Failure: + 8) Failure: combined::bool [file:42] 0 != value 0 != 1 - 8) Failure: + 9) Failure: combined::multiline_description [file:42] Function call failed: -1 description line 1 description line 2 - 9) Failure: + 10) Failure: combined::null_string [file:42] String mismatch: "expected" != actual ("this one fails") 'expected' != NULL + 11) Failure: +combined::failf [file:42] + Test failed. + some reason: foo + + 12) Failure: +combined::compare_i [file:42] + Expected comparison to hold: two < 1 + 2 >= 1 + + 13) Failure: +combined::compare_i_with_format [file:42] + Expected comparison to hold: two < 1 + foo: bar + + 14) Failure: +combined::compare_u [file:42] + Expected comparison to hold: two < 1 + 2 >= 1 + + 15) Failure: +combined::compare_u_with_format [file:42] + Expected comparison to hold: two < 1 + foo: bar + |
