Lines Matching +full:x +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()
37 int X = 1; in first_arg_example() local
39 #define foo X, Y, Z, Q in first_arg_example()
42 KUNIT_EXPECT_EQ(test, bar, X); in first_arg_example()
43 KUNIT_EXPECT_STREQ(test, __stringify(bar), "X"); 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()
89 KUNIT_EXPECT_STREQ(test, a[0], "X"); in sep_comma_example()
91 KUNIT_EXPECT_STREQ(test, a[2], "Z"); 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
146 int Y = -2, Z = -3, Q = -4; 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() 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()
182 KUNIT_EXPECT_STREQ(test, __stringify(FIRST_ARG(FOO_ARGS)), "X"); in first_arg_test()
187 int Q = -4; in last_arg_test()
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()