Skip to content

Commit 84fbed8

Browse files
authored
[scudo] Refactor the secondary test (llvm#125595)
Remove all redundant code and create a couple of structs to handle automatic init and destruction. This replaces the test fixtures in prepartion for passing in multiple configs for some of these tests. This is necessary because not all of the gtest features are supported here, and there is no easy way to create a test fixture with a template.
1 parent b7f0edb commit 84fbed8

File tree

2 files changed

+191
-172
lines changed

2 files changed

+191
-172
lines changed

compiler-rt/lib/scudo/standalone/tests/scudo_unit_test.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
#include <zxtest/zxtest.h>
1313
using Test = ::zxtest::Test;
1414
#define TEST_SKIP(message) ZXTEST_SKIP(message)
15+
#define TEST_HAS_FAILURE true
1516
#else
1617
#include "gtest/gtest.h"
1718
using Test = ::testing::Test;
1819
#define TEST_SKIP(message) \
1920
do { \
2021
GTEST_SKIP() << message; \
2122
} while (0)
23+
#define TEST_HAS_FAILURE Test::HasFailure()
2224
#endif
2325

2426
// If EXPECT_DEATH isn't defined, make it a no-op.

0 commit comments

Comments
 (0)