Lines Matching +full:a +full:- +full:z
1 // SPDX-License-Identifier: GPL-2.0
12 #define foo X, Y, Z, Q in call_args_example()
26 #define foo X, Y, Z, Q in drop_first_arg_example()
39 #define foo X, Y, Z, Q in first_arg_example()
53 #define foo X, Y, Z, Q in last_arg_example()
65 int Y = 1, Z = 2; in pick_arg_example() local
67 #define foo X, Y, Z, Q in pick_arg_example()
73 KUNIT_EXPECT_EQ(test, buz, Z); in pick_arg_example()
74 KUNIT_EXPECT_STREQ(test, __stringify(buz), "Z"); in pick_arg_example()
83 #define foo(f) f(X) f(Y) f(Z) f(Q) in sep_comma_example()
87 static const char * const a[] = { bar }; in sep_comma_example() local
89 KUNIT_EXPECT_STREQ(test, a[0], "X"); in sep_comma_example()
90 KUNIT_EXPECT_STREQ(test, a[1], "Y"); in sep_comma_example()
91 KUNIT_EXPECT_STREQ(test, a[2], "Z"); in sep_comma_example()
92 KUNIT_EXPECT_STREQ(test, a[3], "Q"); in sep_comma_example()
102 #define FOO_ARGS X, Y, Z, Q
103 #define MAX_ARGS -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12
117 count = COUNT_ARGS(a, b, c, d, e); in count_args_test()
120 count = COUNT_ARGS(a, b, c, d, e, f, g, h, i, j, k, l); in count_args_test()
146 int Y = -2, Z = -3, Q = -4; in drop_first_arg_test() local
147 int a[] = { DROP_FIRST_ARG(FOO_ARGS) }; in drop_first_arg_test() local
149 KUNIT_EXPECT_EQ(test, DROP_FIRST_ARG(0, -1), -1); in drop_first_arg_test()
150 KUNIT_EXPECT_EQ(test, DROP_FIRST_ARG(DROP_FIRST_ARG(0, -1, -2)), -2); in drop_first_arg_test()
153 KUNIT_EXPECT_EQ(test, DROP_FIRST_ARG(DROP_FIRST_ARG(DROP_FIRST_ARG(FOO_ARGS))), -4); in drop_first_arg_test()
154 KUNIT_EXPECT_EQ(test, a[0], -2); in drop_first_arg_test()
155 KUNIT_EXPECT_EQ(test, a[1], -3); in drop_first_arg_test()
156 KUNIT_EXPECT_EQ(test, a[2], -4); in drop_first_arg_test()
174 int X = -1; in first_arg_test()
175 int a[] = { FIRST_ARG(FOO_ARGS) }; in first_arg_test() local
177 KUNIT_EXPECT_EQ(test, FIRST_ARG(-1, -2), -1); in first_arg_test()
180 KUNIT_EXPECT_EQ(test, FIRST_ARG(FOO_ARGS), -1); in first_arg_test()
181 KUNIT_EXPECT_EQ(test, a[0], -1); in first_arg_test()
187 int Q = -4; in last_arg_test()
188 int a[] = { LAST_ARG(FOO_ARGS) }; in last_arg_test() local
190 KUNIT_EXPECT_EQ(test, LAST_ARG(-1, -2), -2); in last_arg_test()
193 KUNIT_EXPECT_EQ(test, LAST_ARG(FOO_ARGS), -4); in last_arg_test()
194 KUNIT_EXPECT_EQ(test, a[0], -4); in last_arg_test()
197 KUNIT_EXPECT_EQ(test, LAST_ARG(MAX_ARGS), -12); in last_arg_test()
198 KUNIT_EXPECT_STREQ(test, __stringify(LAST_ARG(MAX_ARGS)), "-12"); in last_arg_test()