diff options
author | Daniel Latypov <dlatypov@google.com> | 2022-01-13 08:59:29 -0800 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2022-01-25 12:49:53 -0700 |
commit | dd640d70874bd27fb081d444252677766321c32f (patch) | |
tree | bf2e203954fe8929d65b61848e28a902caa133ef /include/kunit | |
parent | a91e9ade402c48ee35cd1e4b671e3938db798d17 (diff) | |
download | linux-rpi-dd640d70874bd27fb081d444252677766321c32f.tar.gz linux-rpi-dd640d70874bd27fb081d444252677766321c32f.tar.bz2 linux-rpi-dd640d70874bd27fb081d444252677766321c32f.zip |
kunit: factor out kunit_base_assert_format() call into kunit_fail()
We call this function first thing for all the assertion `format()`
functions.
This is the part that prints the file and line number and assertion type
(EXPECTATION, ASSERTION).
Having it as part of the format functions lets us have the flexibility
to not print that information (or print it differently) for new
assertion types, but I think this we don't need that.
And in the future, we'd like to consider factoring that data (file,
line#, type) out of the kunit_assert struct and into a `static`
variable, as Linus suggested [1], so we'd need to extract it anyways.
[1] https://groups.google.com/g/kunit-dev/c/i3fZXgvBrfA/m/VULQg1z6BAAJ
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'include/kunit')
0 files changed, 0 insertions, 0 deletions