Skip to content

Commit

Permalink
SkQP: SK_DO_NOT_REGISTER_NONGPU_UNIT_TESTS no longer uses __attribute_
Browse files Browse the repository at this point in the history
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Change-Id: I6b845ff8030b64df64165b1a43fbb7331b35d9e6
Reviewed-on: https://skia-review.googlesource.com/c/169320
Commit-Queue: Hal Canary <[email protected]>
Commit-Queue: Ben Wagner <[email protected]>
Auto-Submit: Hal Canary <[email protected]>
Reviewed-by: Ben Wagner <[email protected]>
  • Loading branch information
HalCanary authored and Skia Commit-Bot committed Nov 7, 2018
1 parent 34d7a16 commit b52c273
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,16 @@ class Timer {
} \
} while (0)

// SK_DO_NOT_REGISTER_NONGPU_UNIT_TESTS is experimental and does not work with
// compilers that don't understand `__attribute__ ((unused))`.
#ifdef SK_DO_NOT_REGISTER_NONGPU_UNIT_TESTS
#define DEF_TEST(name, reporter) \
__attribute__ ((unused)) \
static void test_##name(skiatest::Reporter* reporter, const GrContextOptions&)
namespace skiatest {
struct NonRegister {
NonRegister(TestProc) {}
};
}
#define DEF_TEST(name, reporter) \
static void test_##name(skiatest::Reporter*, const GrContextOptions&); \
static skiatest::NonRegister name##_NonTestRegistry(test_##name); \
void test_##name(skiatest::Reporter* reporter, const GrContextOptions&)
#else
#define DEF_TEST(name, reporter) \
static void test_##name(skiatest::Reporter*, const GrContextOptions&); \
Expand Down

0 comments on commit b52c273

Please sign in to comment.