From 56006dcf659dd235df1b122f502dacd2f1b704b9 Mon Sep 17 00:00:00 2001 From: Victor Costan Date: Thu, 21 Feb 2019 09:43:40 +0000 Subject: [PATCH] test: Replace _TEST_CASE_ with _TEST_SUITE_. Googletest is (at last) converging with industry-standard terminology [1]. We previously called test suites "test cases", which was rather confusing for folks coming from any other testing framework. Chrome now has a googletest version that supports _TEST_SUITE_ macros instead of _TEST_CASE_, so this CL cleans up some of the outdated usage. [1] https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature Bug: chromium:925652 Change-Id: I86067e8846e31adedcf139f9650ac4e0ed5fbb19 Reviewed-on: https://dawn-review.googlesource.com/c/4921 Commit-Queue: Corentin Wallez Reviewed-by: Corentin Wallez --- src/tests/DawnTest.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/tests/DawnTest.h b/src/tests/DawnTest.h index 1b957821f1..8c28e23e47 100644 --- a/src/tests/DawnTest.h +++ b/src/tests/DawnTest.h @@ -186,12 +186,13 @@ class DawnTest : public ::testing::TestWithParam { // Instantiate the test once for each backend provided after the first argument. Use it like this: // DAWN_INSTANTIATE_TEST(MyTestFixture, MetalBackend, OpenGLBackend) -#define DAWN_INSTANTIATE_TEST(testName, firstParam, ...) \ - const decltype(firstParam) testName##params[] = {firstParam, ##__VA_ARGS__}; \ - INSTANTIATE_TEST_CASE_P(, testName, \ - testing::ValuesIn(::detail::FilterBackends( \ - testName##params, sizeof(testName##params) / sizeof(firstParam))), \ - ::detail::GetParamName); +#define DAWN_INSTANTIATE_TEST(testName, firstParam, ...) \ + const decltype(firstParam) testName##params[] = {firstParam, ##__VA_ARGS__}; \ + INSTANTIATE_TEST_SUITE_P( \ + , testName, \ + testing::ValuesIn(::detail::FilterBackends( \ + testName##params, sizeof(testName##params) / sizeof(firstParam))), \ + ::detail::GetParamName); // Skip a test when the given condition is satisfied. #define DAWN_SKIP_TEST_IF(condition) \