SkQP: SK_DO_NOT_REGISTER_NONGPU_UNIT_TESTS no longer uses __attribute_
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 <halcanary@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Auto-Submit: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
34d7a163a4
commit
b52c273d3f
14
tests/Test.h
14
tests/Test.h
@ -176,12 +176,16 @@ private:
|
||||
} \
|
||||
} 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&); \
|
||||
|
Loading…
Reference in New Issue
Block a user