Skip to content

Commit 620bf4a

Browse files
pragma wrap
1 parent ec4be66 commit 620bf4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libc/test/UnitTest/LibcTest.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ CString libc_make_test_file_path_func(const char *file_name);
334334
return "[ParamType = " #TYPE "]"; \
335335
}
336336

337+
#pragma GCC diagnostic push
338+
#pragma GCC diagnostic ignored "-Wglobal-constructors"
339+
337340
#define TYPED_TEST(SuiteName, TestName, TypeList) \
338341
static_assert( \
339342
LIBC_NAMESPACE::testing::internal::valid_prefix(#SuiteName), \
@@ -400,6 +403,8 @@ CString libc_make_test_file_path_func(const char *file_name);
400403
SuiteClass##_##TestName SuiteClass##_##TestName##_Instance; \
401404
void SuiteClass##_##TestName::Run()
402405

406+
#pragma GCC diagnostic pop
407+
403408
// Helper to trick the compiler into ignoring lack of braces on the else
404409
// branch. We cannot introduce braces at this point, since it would prevent
405410
// using `<< ...` after the test macro for additional failure output.

0 commit comments

Comments
 (0)