summaryrefslogtreecommitdiff
path: root/include/kunit
diff options
context:
space:
mode:
Diffstat (limited to 'include/kunit')
-rw-r--r--include/kunit/assert.h7
-rw-r--r--include/kunit/test.h12
2 files changed, 6 insertions, 13 deletions
diff --git a/include/kunit/assert.h b/include/kunit/assert.h
index 43144cfddc19..24c2b9fa61e8 100644
--- a/include/kunit/assert.h
+++ b/include/kunit/assert.h
@@ -192,13 +192,6 @@ void kunit_binary_str_assert_format(const struct kunit_assert *assert,
const struct va_format *message,
struct string_stream *stream);
-#define KUNIT_INIT_MEM_ASSERT_STRUCT(text_, left_val, right_val, size_) { \
- .text = text_, \
- .left_value = left_val, \
- .right_value = right_val, \
- .size = size_ \
-}
-
/**
* struct kunit_mem_assert - An expectation/assertion that compares two
* memory blocks.
diff --git a/include/kunit/test.h b/include/kunit/test.h
index d7f60e8aab30..4666a4d199ea 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -666,13 +666,13 @@ do { \
left, \
op, \
right, \
- size, \
+ size_, \
fmt, \
...) \
do { \
const void *__left = (left); \
const void *__right = (right); \
- const size_t __size = (size); \
+ const size_t __size = (size_); \
static const struct kunit_binary_assert_text __text = { \
.operation = #op, \
.left_text = #left, \
@@ -686,10 +686,10 @@ do { \
assert_type, \
kunit_mem_assert, \
kunit_mem_assert_format, \
- KUNIT_INIT_MEM_ASSERT_STRUCT(&__text, \
- __left, \
- __right, \
- __size), \
+ KUNIT_INIT_ASSERT(.text = &__text, \
+ .left_value = __left, \
+ .right_value = __right, \
+ .size = __size), \
fmt, \
##__VA_ARGS__); \
} while (0)