@@ -334,18 +334,6 @@ CString libc_make_test_file_path_func(const char *file_name);
334
334
return " [ParamType = " #TYPE " ]" ; \
335
335
}
336
336
337
- #define LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA (x ) _Pragma (#x)
338
-
339
- #define LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
340
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA (GCC diagnostic push)
341
-
342
- #define LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
343
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA (GCC diagnostic ignored \
344
- " -Wglobal-constructors" )
345
-
346
- #define LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
347
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA (GCC diagnostic pop)
348
-
349
337
#define TYPED_TEST (SuiteName, TestName, TypeList ) \
350
338
static_assert ( \
351
339
LIBC_NAMESPACE::testing::internal::valid_prefix (#SuiteName), \
@@ -363,11 +351,8 @@ CString libc_make_test_file_path_func(const char *file_name);
363
351
void Run () override ; \
364
352
const char *getName () const override { return name; } \
365
353
}; \
366
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
367
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
368
354
TypeList::Tests<SuiteName##_##TestName>::type \
369
355
SuiteName##_##TestName##_Instance; \
370
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
371
356
template <typename T> void SuiteName##_##TestName<T>::Run()
372
357
373
358
#define TYPED_TEST_F (SuiteClass, TestName, TypeList ) \
@@ -386,11 +371,8 @@ CString libc_make_test_file_path_func(const char *file_name);
386
371
void Run () override ; \
387
372
const char *getName () const override { return name; } \
388
373
}; \
389
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
390
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
391
374
TypeList::Tests<SuiteClass##_##TestName>::type \
392
375
SuiteClass##_##TestName##_Instance; \
393
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
394
376
template <typename T> void SuiteClass##_##TestName<T>::Run()
395
377
396
378
#define TEST (SuiteName, TestName ) \
@@ -402,10 +384,7 @@ CString libc_make_test_file_path_func(const char *file_name);
402
384
void Run () override ; \
403
385
const char *getName () const override { return #SuiteName " ." #TestName; } \
404
386
}; \
405
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
406
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
407
387
SuiteName##_##TestName SuiteName##_##TestName##_Instance; \
408
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
409
388
void SuiteName##_##TestName::Run()
410
389
411
390
#define TEST_F (SuiteClass, TestName ) \
@@ -418,10 +397,7 @@ CString libc_make_test_file_path_func(const char *file_name);
418
397
void Run () override ; \
419
398
const char *getName () const override { return #SuiteClass " ." #TestName; } \
420
399
}; \
421
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BEGIN \
422
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_BODY \
423
400
SuiteClass##_##TestName SuiteClass##_##TestName##_Instance; \
424
- LIBC_TEST_GLOBAL_CTOR_DO_PRAGMA_END \
425
401
void SuiteClass##_##TestName::Run()
426
402
427
403
// Helper to trick the compiler into ignoring lack of braces on the else
0 commit comments