Lines Matching refs:fixture_name
238 #define FIXTURE(fixture_name) \ argument
239 FIXTURE_VARIANT(fixture_name); \
240 static struct __fixture_metadata _##fixture_name##_fixture_object = \
241 { .name = #fixture_name, }; \
243 _register_##fixture_name##_data(void) \
245 __register_fixture(&_##fixture_name##_fixture_object); \
247 FIXTURE_DATA(fixture_name)
268 #define FIXTURE_SETUP(fixture_name) \ argument
269 void fixture_name##_setup( \
271 FIXTURE_DATA(fixture_name) __attribute__((unused)) *self, \
272 const FIXTURE_VARIANT(fixture_name) \
291 #define FIXTURE_TEARDOWN(fixture_name) \ argument
292 void fixture_name##_teardown( \
294 FIXTURE_DATA(fixture_name) __attribute__((unused)) *self, \
295 const FIXTURE_VARIANT(fixture_name) \
315 #define FIXTURE_VARIANT(fixture_name) struct _fixture_variant_##fixture_name argument
335 #define FIXTURE_VARIANT_ADD(fixture_name, variant_name) \ argument
336 extern FIXTURE_VARIANT(fixture_name) \
337 _##fixture_name##_##variant_name##_variant; \
339 _##fixture_name##_##variant_name##_object = \
341 .data = &_##fixture_name##_##variant_name##_variant}; \
343 _register_##fixture_name##_##variant_name(void) \
345 __register_fixture_variant(&_##fixture_name##_fixture_object, \
346 &_##fixture_name##_##variant_name##_object); \
348 FIXTURE_VARIANT(fixture_name) \
349 _##fixture_name##_##variant_name##_variant =
366 #define TEST_F(fixture_name, test_name) \ argument
367 __TEST_F_IMPL(fixture_name, test_name, -1, TEST_TIMEOUT_DEFAULT)
369 #define TEST_F_SIGNAL(fixture_name, test_name, signal) \ argument
370 __TEST_F_IMPL(fixture_name, test_name, signal, TEST_TIMEOUT_DEFAULT)
372 #define TEST_F_TIMEOUT(fixture_name, test_name, timeout) \ argument
373 __TEST_F_IMPL(fixture_name, test_name, -1, timeout)
375 #define __TEST_F_IMPL(fixture_name, test_name, signal, tmout) \ argument
376 static void fixture_name##_##test_name( \
378 FIXTURE_DATA(fixture_name) *self, \
379 const FIXTURE_VARIANT(fixture_name) *variant); \
380 static inline void wrapper_##fixture_name##_##test_name( \
385 FIXTURE_DATA(fixture_name) self; \
386 memset(&self, 0, sizeof(FIXTURE_DATA(fixture_name))); \
388 fixture_name##_setup(_metadata, &self, variant->data); \
393 fixture_name##_##test_name(_metadata, &self, variant->data); \
396 fixture_name##_teardown(_metadata, &self, variant->data); \
400 _##fixture_name##_##test_name##_object = { \
402 .fn = &wrapper_##fixture_name##_##test_name, \
403 .fixture = &_##fixture_name##_fixture_object, \
408 _register_##fixture_name##_##test_name(void) \
410 __register_test(&_##fixture_name##_##test_name##_object); \
412 static void fixture_name##_##test_name( \
414 FIXTURE_DATA(fixture_name) __attribute__((unused)) *self, \
415 const FIXTURE_VARIANT(fixture_name) \