We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d33265 commit 6f5f0b2Copy full SHA for 6f5f0b2
tests/unit/util/test.inc
@@ -166,9 +166,9 @@ void test_UTIL_LISTIFY(void)
166
{
167
int i = 0;
168
169
-#define INC(x, _) \
+#define INC(x, n, m) \
170
do { \
171
- i += x; \
+ i += (x + n + m);\
172
} while (0);
173
174
#define DEFINE(x, y) int a##x = x * y;
@@ -177,9 +177,9 @@ void test_UTIL_LISTIFY(void)
177
UTIL_LISTIFY(4, DEFINE, 2)
178
UTIL_LISTIFY(4, MARK_UNUSED, _)
179
180
- UTIL_LISTIFY(4, INC, _)
+ UTIL_LISTIFY(4, INC, 1, 2)
181
182
- zassert_equal(i, 0 + 1 + 2 + 3, NULL);
+ zassert_equal(i, 0 + 1 + 2 + 3 + 4 * (1 + 2), NULL);
183
zassert_equal(a0, 0, NULL);
184
zassert_equal(a1, 2, NULL);
185
zassert_equal(a2, 4, NULL);
0 commit comments