summaryrefslogtreecommitdiff
path: root/include/kunit
diff options
context:
space:
mode:
authorDaniel Latypov <dlatypov@google.com>2020-11-02 15:23:04 -0800
committerShuah Khan <skhan@linuxfoundation.org>2020-11-10 13:45:15 -0700
commit3084db0e0d5076cd48408274ab0911cd3ccdae88 (patch)
treeb4b67bcd3334881dfd2d13c5cda427cab7ed1570 /include/kunit
parent060352e141e4c71ce147a2737f6d30a97f2ec317 (diff)
kunit: fix display of failed expectations for strings
Currently the following expectation KUNIT_EXPECT_STREQ(test, "hi", "bye"); will produce: Expected "hi" == "bye", but "hi" == 1625079497 "bye" == 1625079500 After this patch: Expected "hi" == "bye", but "hi" == hi "bye" == bye KUNIT_INIT_BINARY_STR_ASSERT_STRUCT() was written but just mistakenly not actually used by KUNIT_EXPECT_STREQ() and friends. Signed-off-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Tested-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'include/kunit')
-rw-r--r--include/kunit/test.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kunit/test.h b/include/kunit/test.h
index db1b0ae666c4..df60be7e22ca 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -1105,7 +1105,7 @@ do { \
KUNIT_ASSERTION(test, \
strcmp(__left, __right) op 0, \
kunit_binary_str_assert, \
- KUNIT_INIT_BINARY_ASSERT_STRUCT(test, \
+ KUNIT_INIT_BINARY_STR_ASSERT_STRUCT(test, \
assert_type, \
#op, \
#left, \