Skip to content

Commit 3084db0

Browse files
dlatypovshuahkh
authored andcommitted
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>
1 parent 060352e commit 3084db0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/kunit/test.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ do { \
11051105
KUNIT_ASSERTION(test, \
11061106
strcmp(__left, __right) op 0, \
11071107
kunit_binary_str_assert, \
1108-
KUNIT_INIT_BINARY_ASSERT_STRUCT(test, \
1108+
KUNIT_INIT_BINARY_STR_ASSERT_STRUCT(test, \
11091109
assert_type, \
11101110
#op, \
11111111
#left, \

0 commit comments

Comments
 (0)