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:
Hal Canary 2018-11-07 11:04:30 -05:00 committed by Skia Commit-Bot
parent 34d7a163a4
commit b52c273d3f

View File

@ -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&); \