linux/include/kunit
Daniel Latypov 97d453bc40 kunit: rename base KUNIT_ASSERTION macro to _KUNIT_FAILED
Context:
Currently this macro's name, KUNIT_ASSERTION conflicts with the name of
an enum whose values are {KUNIT_EXPECTATION, KUNIT_ASSERTION}.

It's hard to think of a better name for the enum, so rename this macro.
It's also a bit strange that the macro might do nothing depending on the
boolean argument `pass`. Why not have callers check themselves?

This patch:
Moves the pass/fail checking into the callers of KUNIT_ASSERTION, so now
we only call it when the check has failed.
Then we rename the macro the _KUNIT_FAILED() to reflect the new
semantics.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-10-07 10:16:45 -06:00
..
assert.h kunit: remove format func from struct kunit_assert, get it to 0 bytes 2022-10-07 10:16:38 -06:00
resource.h kunit: make kunit_kfree() only work on pointers from kunit_malloc() and friends 2022-10-07 10:15:44 -06:00
test-bug.h kunit: fix -Wunused-function warning for __kunit_fail_current_test 2021-04-06 15:22:39 -06:00
test.h kunit: rename base KUNIT_ASSERTION macro to _KUNIT_FAILED 2022-10-07 10:16:45 -06:00
try-catch.h kunit: hide unexported try-catch interface in try-catch-impl.h 2020-01-09 16:42:09 -07:00