Commit ffd39978 by Victor Costan Committed by Commit Bot

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: Ia0deec0bc4216ef1adabc33985a7cbda89682608 Reviewed-on: https://chromium-review.googlesource.com/c/1477418Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Victor Costan <pwnall@chromium.org>
parent 902ceed3
...@@ -161,6 +161,6 @@ TEST_P(VaryingPackingTest, MaxPlusOneMat2VaryingsFailsWebGL) ...@@ -161,6 +161,6 @@ TEST_P(VaryingPackingTest, MaxPlusOneMat2VaryingsFailsWebGL)
} }
// Makes separate tests for different values of kMaxVaryings. // Makes separate tests for different values of kMaxVaryings.
INSTANTIATE_TEST_CASE_P(, VaryingPackingTest, ::testing::Values(1, 4, 8)); INSTANTIATE_TEST_SUITE_P(, VaryingPackingTest, ::testing::Values(1, 4, 8));
} // anonymous namespace } // anonymous namespace
...@@ -443,7 +443,7 @@ static const scaleValidPair scales[] = {scaleValidPair(1.0f, true), scaleValidPa ...@@ -443,7 +443,7 @@ static const scaleValidPair scales[] = {scaleValidPair(1.0f, true), scaleValidPa
scaleValidPair(0.0f, false), scaleValidPair(0.01f, true), scaleValidPair(0.0f, false), scaleValidPair(0.01f, true),
scaleValidPair(2.00f, true)}; scaleValidPair(2.00f, true)};
INSTANTIATE_TEST_CASE_P(NativeWindowTest, CoreWindowScaleTest, testing::ValuesIn(scales)); INSTANTIATE_TEST_SUITE_P(NativeWindowTest, CoreWindowScaleTest, testing::ValuesIn(scales));
// Tests that the size property works as expected in a property set with a SwapChainPanel // Tests that the size property works as expected in a property set with a SwapChainPanel
class CoreWindowSizeTest : public testing::TestWithParam<std::tuple<float, float, bool>> class CoreWindowSizeTest : public testing::TestWithParam<std::tuple<float, float, bool>>
...@@ -492,6 +492,6 @@ typedef std::tuple<float, float, bool> sizeValidPair; ...@@ -492,6 +492,6 @@ typedef std::tuple<float, float, bool> sizeValidPair;
static const sizeValidPair sizes[] = {sizeValidPair(800, 480, true), sizeValidPair(0, 480, false), static const sizeValidPair sizes[] = {sizeValidPair(800, 480, true), sizeValidPair(0, 480, false),
sizeValidPair(800, 0, false), sizeValidPair(0, 0, false)}; sizeValidPair(800, 0, false), sizeValidPair(0, 0, false)};
INSTANTIATE_TEST_CASE_P(NativeWindowTest, CoreWindowSizeTest, testing::ValuesIn(sizes)); INSTANTIATE_TEST_SUITE_P(NativeWindowTest, CoreWindowSizeTest, testing::ValuesIn(sizes));
} // namespace } // namespace
...@@ -566,7 +566,7 @@ static const scaleValidPair scales[] = {scaleValidPair(1.0f, true), scaleValidPa ...@@ -566,7 +566,7 @@ static const scaleValidPair scales[] = {scaleValidPair(1.0f, true), scaleValidPa
scaleValidPair(0.0f, false), scaleValidPair(0.01f, true), scaleValidPair(0.0f, false), scaleValidPair(0.01f, true),
scaleValidPair(2.00f, true)}; scaleValidPair(2.00f, true)};
INSTANTIATE_TEST_CASE_P(NativeWindowTest, SwapChainPanelScaleTest, testing::ValuesIn(scales)); INSTANTIATE_TEST_SUITE_P(NativeWindowTest, SwapChainPanelScaleTest, testing::ValuesIn(scales));
// Tests that the size property works as expected in a property set with a SwapChainPanel // Tests that the size property works as expected in a property set with a SwapChainPanel
class SwapChainPanelSizeTest : public testing::TestWithParam<std::tuple<float, float, bool>> class SwapChainPanelSizeTest : public testing::TestWithParam<std::tuple<float, float, bool>>
...@@ -615,6 +615,6 @@ typedef std::tuple<float, float, bool> sizeValidPair; ...@@ -615,6 +615,6 @@ typedef std::tuple<float, float, bool> sizeValidPair;
static const sizeValidPair sizes[] = {sizeValidPair(800, 480, true), sizeValidPair(0, 480, false), static const sizeValidPair sizes[] = {sizeValidPair(800, 480, true), sizeValidPair(0, 480, false),
sizeValidPair(800, 0, false), sizeValidPair(0, 0, false)}; sizeValidPair(800, 0, false), sizeValidPair(0, 0, false)};
INSTANTIATE_TEST_CASE_P(NativeWindowTest, SwapChainPanelSizeTest, testing::ValuesIn(sizes)); INSTANTIATE_TEST_SUITE_P(NativeWindowTest, SwapChainPanelSizeTest, testing::ValuesIn(sizes));
} // namespace } // namespace
...@@ -270,11 +270,11 @@ TEST_P(EXTYUVTargetTest, CompileSucceedsWithExtensionAndPragma) ...@@ -270,11 +270,11 @@ TEST_P(EXTYUVTargetTest, CompileSucceedsWithExtensionAndPragma)
EXPECT_TRUE(TestShaderCompile(EXTYTPragma)); EXPECT_TRUE(TestShaderCompile(EXTYTPragma));
} }
INSTANTIATE_TEST_CASE_P(CorrectVariantsWithExtensionAndPragma, INSTANTIATE_TEST_SUITE_P(CorrectVariantsWithExtensionAndPragma,
EXTYUVTargetTest, EXTYUVTargetTest,
Combine(Values(SH_GLES3_SPEC), Combine(Values(SH_GLES3_SPEC),
Values(sh::ESSLVersion300), Values(sh::ESSLVersion300),
Values(ESSL300_SimpleShader, ESSL300_FragColorShader))); Values(ESSL300_SimpleShader, ESSL300_FragColorShader)));
class EXTYUVTargetCompileSuccessTest : public EXTYUVTargetTest class EXTYUVTargetCompileSuccessTest : public EXTYUVTargetTest
{}; {};
...@@ -287,14 +287,14 @@ TEST_P(EXTYUVTargetCompileSuccessTest, CompileSucceeds) ...@@ -287,14 +287,14 @@ TEST_P(EXTYUVTargetCompileSuccessTest, CompileSucceeds)
EXPECT_TRUE(TestShaderCompile(EXTYTPragma)); EXPECT_TRUE(TestShaderCompile(EXTYTPragma));
} }
INSTANTIATE_TEST_CASE_P(CorrectESSL300Shaders, INSTANTIATE_TEST_SUITE_P(CorrectESSL300Shaders,
EXTYUVTargetCompileSuccessTest, EXTYUVTargetCompileSuccessTest,
Combine(Values(SH_GLES3_SPEC), Combine(Values(SH_GLES3_SPEC),
Values(sh::ESSLVersion300), Values(sh::ESSLVersion300),
Values(ESSL300_FragColorShader, Values(ESSL300_FragColorShader,
ESSL300_YUVQualifierMultipleTimesShader, ESSL300_YUVQualifierMultipleTimesShader,
ESSL300_YuvCscStandardEXTShader, ESSL300_YuvCscStandardEXTShader,
ESSL300_BuiltInFunctionsShader))); ESSL300_BuiltInFunctionsShader)));
class EXTYUVTargetCompileFailureTest : public EXTYUVTargetTest class EXTYUVTargetCompileFailureTest : public EXTYUVTargetTest
{}; {};
...@@ -307,27 +307,27 @@ TEST_P(EXTYUVTargetCompileFailureTest, CompileFails) ...@@ -307,27 +307,27 @@ TEST_P(EXTYUVTargetCompileFailureTest, CompileFails)
EXPECT_FALSE(TestShaderCompile(EXTYTPragma)); EXPECT_FALSE(TestShaderCompile(EXTYTPragma));
} }
INSTANTIATE_TEST_CASE_P(IncorrectESSL300Shaders, INSTANTIATE_TEST_SUITE_P(IncorrectESSL300Shaders,
EXTYUVTargetCompileFailureTest, EXTYUVTargetCompileFailureTest,
Combine(Values(SH_GLES3_SPEC), Combine(Values(SH_GLES3_SPEC),
Values(sh::ESSLVersion300), Values(sh::ESSLVersion300),
Values(ESSL300_YUVQualifierFailureShader1, Values(ESSL300_YUVQualifierFailureShader1,
ESSL300_YUVQualifierFailureShader2, ESSL300_YUVQualifierFailureShader2,
ESSL300_LocationAndYUVFailureShader, ESSL300_LocationAndYUVFailureShader,
ESSL300_MultipleColorAndYUVOutputsFailureShader1, ESSL300_MultipleColorAndYUVOutputsFailureShader1,
ESSL300_MultipleColorAndYUVOutputsFailureShader2, ESSL300_MultipleColorAndYUVOutputsFailureShader2,
ESSL300_DepthAndYUVOutputsFailureShader, ESSL300_DepthAndYUVOutputsFailureShader,
ESSL300_MultipleYUVOutputsFailureShader, ESSL300_MultipleYUVOutputsFailureShader,
ESSL300_YuvCscStandartdEXTConstructFailureShader1, ESSL300_YuvCscStandartdEXTConstructFailureShader1,
ESSL300_YuvCscStandartdEXTConstructFailureShader2, ESSL300_YuvCscStandartdEXTConstructFailureShader2,
ESSL300_YuvCscStandartdEXTConversionFailureShader1, ESSL300_YuvCscStandartdEXTConversionFailureShader1,
ESSL300_YuvCscStandartdEXTConversionFailureShader2, ESSL300_YuvCscStandartdEXTConversionFailureShader2,
ESSL300_YuvCscStandartdEXTConversionFailureShader3, ESSL300_YuvCscStandartdEXTConversionFailureShader3,
ESSL300_YuvCscStandartdEXTConversionFailureShader4, ESSL300_YuvCscStandartdEXTConversionFailureShader4,
ESSL300_YuvCscStandartdEXTConversionFailureShader5, ESSL300_YuvCscStandartdEXTConversionFailureShader5,
ESSL300_YuvCscStandartdEXTQualifiersFailureShader1, ESSL300_YuvCscStandartdEXTQualifiersFailureShader1,
ESSL300_YuvCscStandartdEXTQualifiersFailureShader2, ESSL300_YuvCscStandartdEXTQualifiersFailureShader2,
ESSL300_YuvCscStandartdEXTQualifiersFailureShader3))); ESSL300_YuvCscStandartdEXTQualifiersFailureShader3)));
class EXTYUVNotEnabledTest : public EXTYUVTargetTest class EXTYUVNotEnabledTest : public EXTYUVTargetTest
{}; {};
...@@ -341,10 +341,10 @@ TEST_P(EXTYUVNotEnabledTest, CanOverloadConversions) ...@@ -341,10 +341,10 @@ TEST_P(EXTYUVNotEnabledTest, CanOverloadConversions)
EXPECT_TRUE(TestShaderCompile("")); EXPECT_TRUE(TestShaderCompile(""));
} }
INSTANTIATE_TEST_CASE_P(CoreESSL300Shaders, INSTANTIATE_TEST_SUITE_P(CoreESSL300Shaders,
EXTYUVNotEnabledTest, EXTYUVNotEnabledTest,
Combine(Values(SH_GLES3_SPEC), Combine(Values(SH_GLES3_SPEC),
Values(sh::ESSLVersion300), Values(sh::ESSLVersion300),
Values(ESSL300_OverloadRgb2Yuv, ESSL300_OverloadYuv2Rgb))); Values(ESSL300_OverloadRgb2Yuv, ESSL300_OverloadYuv2Rgb)));
} // namespace } // namespace
...@@ -200,22 +200,22 @@ TEST_P(EXTBlendFuncExtendedTest, CompileSucceedsWithExtensionAndPragma) ...@@ -200,22 +200,22 @@ TEST_P(EXTBlendFuncExtendedTest, CompileSucceedsWithExtensionAndPragma)
// The SL #version 100 shaders that are correct work similarly // The SL #version 100 shaders that are correct work similarly
// in both GL2 and GL3, with and without the version string. // in both GL2 and GL3, with and without the version string.
INSTANTIATE_TEST_CASE_P(CorrectESSL100Shaders, INSTANTIATE_TEST_SUITE_P(CorrectESSL100Shaders,
EXTBlendFuncExtendedTest, EXTBlendFuncExtendedTest,
Combine(Values(SH_GLES2_SPEC, SH_GLES3_SPEC), Combine(Values(SH_GLES2_SPEC, SH_GLES3_SPEC),
Values("", sh::ESSLVersion100), Values("", sh::ESSLVersion100),
Values(ESSL100_SimpleShader1, Values(ESSL100_SimpleShader1,
ESSL100_MaxDualSourceAccessShader, ESSL100_MaxDualSourceAccessShader,
ESSL100_FragDataShader))); ESSL100_FragDataShader)));
INSTANTIATE_TEST_CASE_P(CorrectESSL300Shaders, INSTANTIATE_TEST_SUITE_P(CorrectESSL300Shaders,
EXTBlendFuncExtendedTest, EXTBlendFuncExtendedTest,
Combine(Values(SH_GLES3_SPEC), Combine(Values(SH_GLES3_SPEC),
Values(sh::ESSLVersion300), Values(sh::ESSLVersion300),
Values(ESSL300_MaxDualSourceAccessShader, Values(ESSL300_MaxDualSourceAccessShader,
ESSL300_LocationAndUnspecifiedOutputShader, ESSL300_LocationAndUnspecifiedOutputShader,
ESSL300_TwoUnspecifiedLocationOutputsShader, ESSL300_TwoUnspecifiedLocationOutputsShader,
ESSL300_LocationIndexShader))); ESSL300_LocationIndexShader)));
class EXTBlendFuncExtendedCompileFailureTest : public EXTBlendFuncExtendedTest class EXTBlendFuncExtendedCompileFailureTest : public EXTBlendFuncExtendedTest
{}; {};
...@@ -230,39 +230,39 @@ TEST_P(EXTBlendFuncExtendedCompileFailureTest, CompileFails) ...@@ -230,39 +230,39 @@ TEST_P(EXTBlendFuncExtendedCompileFailureTest, CompileFails)
} }
// Incorrect #version 100 shaders fail. // Incorrect #version 100 shaders fail.
INSTANTIATE_TEST_CASE_P(IncorrectESSL100Shaders, INSTANTIATE_TEST_SUITE_P(IncorrectESSL100Shaders,
EXTBlendFuncExtendedCompileFailureTest, EXTBlendFuncExtendedCompileFailureTest,
Combine(Values(SH_GLES2_SPEC), Combine(Values(SH_GLES2_SPEC),
Values(sh::ESSLVersion100), Values(sh::ESSLVersion100),
Values(ESSL100_ColorAndDataWriteFailureShader1, Values(ESSL100_ColorAndDataWriteFailureShader1,
ESSL100_ColorAndDataWriteFailureShader2, ESSL100_ColorAndDataWriteFailureShader2,
ESSL100_ColorAndDataWriteFailureShader3))); ESSL100_ColorAndDataWriteFailureShader3)));
// Correct #version 300 es shaders fail in GLES2 context, regardless of version string. // Correct #version 300 es shaders fail in GLES2 context, regardless of version string.
INSTANTIATE_TEST_CASE_P(CorrectESSL300Shaders, INSTANTIATE_TEST_SUITE_P(CorrectESSL300Shaders,
EXTBlendFuncExtendedCompileFailureTest, EXTBlendFuncExtendedCompileFailureTest,
Combine(Values(SH_GLES2_SPEC), Combine(Values(SH_GLES2_SPEC),
Values("", sh::ESSLVersion100, sh::ESSLVersion300), Values("", sh::ESSLVersion100, sh::ESSLVersion300),
Values(ESSL300_LocationAndUnspecifiedOutputShader, Values(ESSL300_LocationAndUnspecifiedOutputShader,
ESSL300_TwoUnspecifiedLocationOutputsShader))); ESSL300_TwoUnspecifiedLocationOutputsShader)));
// Correct #version 100 shaders fail when used with #version 300 es. // Correct #version 100 shaders fail when used with #version 300 es.
INSTANTIATE_TEST_CASE_P(CorrectESSL100Shaders, INSTANTIATE_TEST_SUITE_P(CorrectESSL100Shaders,
EXTBlendFuncExtendedCompileFailureTest, EXTBlendFuncExtendedCompileFailureTest,
Combine(Values(SH_GLES3_SPEC), Combine(Values(SH_GLES3_SPEC),
Values(sh::ESSLVersion300), Values(sh::ESSLVersion300),
Values(ESSL100_SimpleShader1, ESSL100_FragDataShader))); Values(ESSL100_SimpleShader1, ESSL100_FragDataShader)));
// Incorrect #version 300 es shaders always fail. // Incorrect #version 300 es shaders always fail.
INSTANTIATE_TEST_CASE_P(IncorrectESSL300Shaders, INSTANTIATE_TEST_SUITE_P(IncorrectESSL300Shaders,
EXTBlendFuncExtendedCompileFailureTest, EXTBlendFuncExtendedCompileFailureTest,
Combine(Values(SH_GLES3_1_SPEC), Combine(Values(SH_GLES3_1_SPEC),
Values(sh::ESSLVersion300, sh::ESSLVersion310), Values(sh::ESSLVersion300, sh::ESSLVersion310),
Values(ESSL300_LocationIndexFailureShader, Values(ESSL300_LocationIndexFailureShader,
ESSL300_DoubleIndexFailureShader, ESSL300_DoubleIndexFailureShader,
ESSL300_GlobalIndexFailureShader, ESSL300_GlobalIndexFailureShader,
ESSL300_IndexOnUniformVariableFailureShader, ESSL300_IndexOnUniformVariableFailureShader,
ESSL300_IndexOnStructFailureShader, ESSL300_IndexOnStructFailureShader,
ESSL300_IndexOnStructFieldFailureShader))); ESSL300_IndexOnStructFieldFailureShader)));
} // namespace } // namespace
...@@ -58,10 +58,10 @@ TEST_P(EXTFragDepthTest, CompileSucceedsWithExtensionAndPragma) ...@@ -58,10 +58,10 @@ TEST_P(EXTFragDepthTest, CompileSucceedsWithExtensionAndPragma)
// The SL #version 100 shaders that are correct work similarly // The SL #version 100 shaders that are correct work similarly
// in both GL2 and GL3, with and without the version string. // in both GL2 and GL3, with and without the version string.
INSTANTIATE_TEST_CASE_P(CorrectESSL100Shaders, INSTANTIATE_TEST_SUITE_P(CorrectESSL100Shaders,
EXTFragDepthTest, EXTFragDepthTest,
Combine(Values(SH_GLES2_SPEC), Combine(Values(SH_GLES2_SPEC),
Values(sh::ESSLVersion100), Values(sh::ESSLVersion100),
Values(ESSL100_FragDepthShader))); Values(ESSL100_FragDepthShader)));
} // anonymous namespace } // anonymous namespace
...@@ -59,10 +59,10 @@ TEST_P(EXTShaderTextureLodTest, CompileSucceedsWithExtensionAndPragma) ...@@ -59,10 +59,10 @@ TEST_P(EXTShaderTextureLodTest, CompileSucceedsWithExtensionAndPragma)
// The SL #version 100 shaders that are correct work similarly // The SL #version 100 shaders that are correct work similarly
// in both GL2 and GL3, with and without the version string. // in both GL2 and GL3, with and without the version string.
INSTANTIATE_TEST_CASE_P(CorrectESSL100Shaders, INSTANTIATE_TEST_SUITE_P(CorrectESSL100Shaders,
EXTShaderTextureLodTest, EXTShaderTextureLodTest,
Combine(Values(SH_GLES2_SPEC), Combine(Values(SH_GLES2_SPEC),
Values(sh::ESSLVersion100), Values(sh::ESSLVersion100),
Values(ESSL100_TextureLodShader))); Values(ESSL100_TextureLodShader)));
} // anonymous namespace } // anonymous namespace
...@@ -63,7 +63,7 @@ class FloatLexTest : public ::testing::Test ...@@ -63,7 +63,7 @@ class FloatLexTest : public ::testing::Test
}; };
typedef ::testing::Types<StrtofClampParser, NumericLexFloatParser> FloatParserTypes; typedef ::testing::Types<StrtofClampParser, NumericLexFloatParser> FloatParserTypes;
TYPED_TEST_CASE(FloatLexTest, FloatParserTypes); TYPED_TEST_SUITE(FloatLexTest, FloatParserTypes);
TYPED_TEST(FloatLexTest, One) TYPED_TEST(FloatLexTest, One)
{ {
......
...@@ -116,4 +116,4 @@ TEST_P(FragDepthTest, ExtensionFDFailsESSL300) ...@@ -116,4 +116,4 @@ TEST_P(FragDepthTest, ExtensionFDFailsESSL300)
} }
// The tests should pass regardless whether the EXT_frag_depth is on or not. // The tests should pass regardless whether the EXT_frag_depth is on or not.
INSTANTIATE_TEST_CASE_P(FragDepthTests, FragDepthTest, testing::Values(false, true)); INSTANTIATE_TEST_SUITE_P(FragDepthTests, FragDepthTest, testing::Values(false, true));
...@@ -80,7 +80,7 @@ TEST_P(OESStandardDerivativesTest, CompileSucceedsWithExtensionAndPragma) ...@@ -80,7 +80,7 @@ TEST_P(OESStandardDerivativesTest, CompileSucceedsWithExtensionAndPragma)
// The SL #version 100 shaders that are correct work similarly // The SL #version 100 shaders that are correct work similarly
// in both GL2 and GL3, with and without the version string. // in both GL2 and GL3, with and without the version string.
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_SUITE_P(
CorrectESSL100Shaders, CorrectESSL100Shaders,
OESStandardDerivativesTest, OESStandardDerivativesTest,
Combine(Values(SH_GLES2_SPEC), Combine(Values(SH_GLES2_SPEC),
......
...@@ -453,15 +453,15 @@ void dEQPTest<TestModuleIndex>::TearDownTestCase() ...@@ -453,15 +453,15 @@ void dEQPTest<TestModuleIndex>::TearDownTestCase()
deqp_libtester_shutdown_platform(); deqp_libtester_shutdown_platform();
} }
#define ANGLE_INSTANTIATE_DEQP_TEST_CASE(API, N) \ #define ANGLE_INSTANTIATE_DEQP_TEST_CASE(API, N) \
class dEQP : public dEQPTest<N> \ class dEQP : public dEQPTest<N> \
{}; \ {}; \
TEST_P(dEQP, API) { runTest(); } \ TEST_P(dEQP, API) { runTest(); } \
\ \
INSTANTIATE_TEST_CASE_P(, dEQP, dEQP::GetTestingRange(), \ INSTANTIATE_TEST_SUITE_P(, dEQP, dEQP::GetTestingRange(), \
[](const testing::TestParamInfo<size_t> &info) { \ [](const testing::TestParamInfo<size_t> &info) { \
return dEQP::GetCaseGTestName(info.param); \ return dEQP::GetCaseGTestName(info.param); \
}) })
#ifdef ANGLE_DEQP_GLES2_TESTS #ifdef ANGLE_DEQP_GLES2_TESTS
ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES2, 0); ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES2, 0);
......
...@@ -512,7 +512,7 @@ const angle::PlatformParameters es2_platforms[] = { ...@@ -512,7 +512,7 @@ const angle::PlatformParameters es2_platforms[] = {
ES2_VULKAN(), ES2_VULKAN(),
}; };
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_SUITE_P(
, ,
MultiDrawTest, MultiDrawTest,
testing::Combine(testing::ValuesIn(::angle::FilterTestParams(platforms, ArraySize(platforms))), testing::Combine(testing::ValuesIn(::angle::FilterTestParams(platforms, ArraySize(platforms))),
...@@ -521,7 +521,7 @@ INSTANTIATE_TEST_CASE_P( ...@@ -521,7 +521,7 @@ INSTANTIATE_TEST_CASE_P(
InstancingOption::UseInstancing)), InstancingOption::UseInstancing)),
PrintToStringParamName()); PrintToStringParamName());
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_SUITE_P(
, ,
MultiDrawNoInstancingSupportTest, MultiDrawNoInstancingSupportTest,
testing::Combine(testing::ValuesIn(::angle::FilterTestParams(es2_platforms, testing::Combine(testing::ValuesIn(::angle::FilterTestParams(es2_platforms,
......
...@@ -39,7 +39,7 @@ typedef testing::Types<D3D11> ConformanceTestTypes; ...@@ -39,7 +39,7 @@ typedef testing::Types<D3D11> ConformanceTestTypes;
template <typename T> \ template <typename T> \
class name : public ConformanceTest<T> \ class name : public ConformanceTest<T> \
{}; \ {}; \
TYPED_TEST_CASE(name, ConformanceTestTypes); TYPED_TEST_SUITE(name, ConformanceTestTypes);
template <typename T> template <typename T>
class ConformanceTest : public testing::Test class ConformanceTest : public testing::Test
......
...@@ -52,7 +52,7 @@ using TestTypes = Types<angle::IterableBitSet<32>, angle::BitSet32<32>, angle::B ...@@ -52,7 +52,7 @@ using TestTypes = Types<angle::IterableBitSet<32>, angle::BitSet32<32>, angle::B
#else #else
using TestTypes = Types<angle::IterableBitSet<32>, angle::BitSet32<32>>; using TestTypes = Types<angle::IterableBitSet<32>, angle::BitSet32<32>>;
#endif // defined(ANGLE_IS_64_BIT_CPU) #endif // defined(ANGLE_IS_64_BIT_CPU)
TYPED_TEST_CASE(BitSetIteratorPerfTest, TestTypes); TYPED_TEST_SUITE(BitSetIteratorPerfTest, TestTypes);
TYPED_TEST(BitSetIteratorPerfTest, Run) TYPED_TEST(BitSetIteratorPerfTest, Run)
{ {
......
...@@ -610,14 +610,14 @@ TEST_P(VulkanCommandBufferPerfTest, Run) ...@@ -610,14 +610,14 @@ TEST_P(VulkanCommandBufferPerfTest, Run)
run(); run();
} }
INSTANTIATE_TEST_CASE_P(, INSTANTIATE_TEST_SUITE_P(,
VulkanCommandBufferPerfTest, VulkanCommandBufferPerfTest,
::testing::Values(PrimaryCBHundredIndividualParams(), ::testing::Values(PrimaryCBHundredIndividualParams(),
PrimaryCBOneWithOneHundredParams(), PrimaryCBOneWithOneHundredParams(),
SecondaryCBParams(), SecondaryCBParams(),
CommandPoolDestroyParams(), CommandPoolDestroyParams(),
CommandPoolHardResetParams(), CommandPoolHardResetParams(),
CommandPoolSoftResetParams(), CommandPoolSoftResetParams(),
CommandBufferExplicitHardResetParams(), CommandBufferExplicitHardResetParams(),
CommandBufferExplicitSoftResetParams(), CommandBufferExplicitSoftResetParams(),
CommandBufferImplicitResetParams())); CommandBufferImplicitResetParams()));
...@@ -92,6 +92,6 @@ TEST_P(CharTest, Identified) ...@@ -92,6 +92,6 @@ TEST_P(CharTest, Identified)
// Note +1 for the max-value in range. It is there because the max-value // Note +1 for the max-value in range. It is there because the max-value
// not included in the range. // not included in the range.
INSTANTIATE_TEST_CASE_P(All, CharTest, testing::Range(CHAR_MIN, CHAR_MAX + 1)); INSTANTIATE_TEST_SUITE_P(All, CharTest, testing::Range(CHAR_MIN, CHAR_MAX + 1));
} // namespace angle } // namespace angle
...@@ -22,22 +22,22 @@ TEST_P(CommentTest, CommentIgnored) ...@@ -22,22 +22,22 @@ TEST_P(CommentTest, CommentIgnored)
EXPECT_EQ(pp::Token::LAST, token.type); EXPECT_EQ(pp::Token::LAST, token.type);
} }
INSTANTIATE_TEST_CASE_P(LineComment, INSTANTIATE_TEST_SUITE_P(LineComment,
CommentTest, CommentTest,
testing::Values("//foo\n", // With newline. testing::Values("//foo\n", // With newline.
"//foo", // Without newline. "//foo", // Without newline.
"//**/", // Nested block comment. "//**/", // Nested block comment.
"////", // Nested line comment. "////", // Nested line comment.
"//\"")); // Invalid character. "//\"")); // Invalid character.
INSTANTIATE_TEST_CASE_P(BlockComment, INSTANTIATE_TEST_SUITE_P(BlockComment,
CommentTest, CommentTest,
testing::Values("/*foo*/", testing::Values("/*foo*/",
"/*foo\n*/", // With newline. "/*foo\n*/", // With newline.
"/*//*/", // Nested line comment. "/*//*/", // Nested line comment.
"/*/**/", // Nested block comment. "/*/**/", // Nested block comment.
"/***/", // With lone '*'. "/***/", // With lone '*'.
"/*\"*/")); // Invalid character. "/*\"*/")); // Invalid character.
class BlockCommentTest : public SimplePreprocessorTest class BlockCommentTest : public SimplePreprocessorTest
{}; {};
......
...@@ -130,6 +130,6 @@ static const ExtensionTestParam kParams[] = { ...@@ -130,6 +130,6 @@ static const ExtensionTestParam kParams[] = {
{"#extension foo : \n", pp::Diagnostics::PP_INVALID_EXTENSION_DIRECTIVE}, {"#extension foo : \n", pp::Diagnostics::PP_INVALID_EXTENSION_DIRECTIVE},
{"#extension foo : 1\n", pp::Diagnostics::PP_INVALID_EXTENSION_BEHAVIOR}, {"#extension foo : 1\n", pp::Diagnostics::PP_INVALID_EXTENSION_BEHAVIOR},
{"#extension foo : bar baz\n", pp::Diagnostics::PP_UNEXPECTED_TOKEN}}; {"#extension foo : bar baz\n", pp::Diagnostics::PP_UNEXPECTED_TOKEN}};
INSTANTIATE_TEST_CASE_P(All, InvalidExtensionTest, testing::ValuesIn(kParams)); INSTANTIATE_TEST_SUITE_P(All, InvalidExtensionTest, testing::ValuesIn(kParams));
} // namespace angle } // namespace angle
...@@ -39,13 +39,13 @@ TEST_P(SingleLetterIdentifierTest, Identified) ...@@ -39,13 +39,13 @@ TEST_P(SingleLetterIdentifierTest, Identified)
} }
// Test string: '_' // Test string: '_'
INSTANTIATE_TEST_CASE_P(Underscore, SingleLetterIdentifierTest, testing::Values('_')); INSTANTIATE_TEST_SUITE_P(Underscore, SingleLetterIdentifierTest, testing::Values('_'));
// Test string: [a-z] // Test string: [a-z]
INSTANTIATE_TEST_CASE_P(a_z, SingleLetterIdentifierTest, CLOSED_RANGE('a', 'z')); INSTANTIATE_TEST_SUITE_P(a_z, SingleLetterIdentifierTest, CLOSED_RANGE('a', 'z'));
// Test string: [A-Z] // Test string: [A-Z]
INSTANTIATE_TEST_CASE_P(A_Z, SingleLetterIdentifierTest, CLOSED_RANGE('A', 'Z')); INSTANTIATE_TEST_SUITE_P(A_Z, SingleLetterIdentifierTest, CLOSED_RANGE('A', 'Z'));
typedef std::tuple<char, char> IdentifierParams; typedef std::tuple<char, char> IdentifierParams;
class DoubleLetterIdentifierTest : public IdentifierTest, class DoubleLetterIdentifierTest : public IdentifierTest,
...@@ -63,64 +63,64 @@ TEST_P(DoubleLetterIdentifierTest, Identified) ...@@ -63,64 +63,64 @@ TEST_P(DoubleLetterIdentifierTest, Identified)
} }
// Test string: "__" // Test string: "__"
INSTANTIATE_TEST_CASE_P(Underscore_Underscore, INSTANTIATE_TEST_SUITE_P(Underscore_Underscore,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(testing::Values('_'), testing::Values('_'))); testing::Combine(testing::Values('_'), testing::Values('_')));
// Test string: "_"[a-z] // Test string: "_"[a-z]
INSTANTIATE_TEST_CASE_P(Underscore_a_z, INSTANTIATE_TEST_SUITE_P(Underscore_a_z,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(testing::Values('_'), CLOSED_RANGE('a', 'z'))); testing::Combine(testing::Values('_'), CLOSED_RANGE('a', 'z')));
// Test string: "_"[A-Z] // Test string: "_"[A-Z]
INSTANTIATE_TEST_CASE_P(Underscore_A_Z, INSTANTIATE_TEST_SUITE_P(Underscore_A_Z,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(testing::Values('_'), CLOSED_RANGE('A', 'Z'))); testing::Combine(testing::Values('_'), CLOSED_RANGE('A', 'Z')));
// Test string: "_"[0-9] // Test string: "_"[0-9]
INSTANTIATE_TEST_CASE_P(Underscore_0_9, INSTANTIATE_TEST_SUITE_P(Underscore_0_9,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(testing::Values('_'), CLOSED_RANGE('0', '9'))); testing::Combine(testing::Values('_'), CLOSED_RANGE('0', '9')));
// Test string: [a-z]"_" // Test string: [a-z]"_"
INSTANTIATE_TEST_CASE_P(a_z_Underscore, INSTANTIATE_TEST_SUITE_P(a_z_Underscore,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(CLOSED_RANGE('a', 'z'), testing::Values('_'))); testing::Combine(CLOSED_RANGE('a', 'z'), testing::Values('_')));
// Test string: [a-z][a-z] // Test string: [a-z][a-z]
INSTANTIATE_TEST_CASE_P(a_z_a_z, INSTANTIATE_TEST_SUITE_P(a_z_a_z,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(CLOSED_RANGE('a', 'z'), CLOSED_RANGE('a', 'z'))); testing::Combine(CLOSED_RANGE('a', 'z'), CLOSED_RANGE('a', 'z')));
// Test string: [a-z][A-Z] // Test string: [a-z][A-Z]
INSTANTIATE_TEST_CASE_P(a_z_A_Z, INSTANTIATE_TEST_SUITE_P(a_z_A_Z,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(CLOSED_RANGE('a', 'z'), CLOSED_RANGE('A', 'Z'))); testing::Combine(CLOSED_RANGE('a', 'z'), CLOSED_RANGE('A', 'Z')));
// Test string: [a-z][0-9] // Test string: [a-z][0-9]
INSTANTIATE_TEST_CASE_P(a_z_0_9, INSTANTIATE_TEST_SUITE_P(a_z_0_9,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(CLOSED_RANGE('a', 'z'), CLOSED_RANGE('0', '9'))); testing::Combine(CLOSED_RANGE('a', 'z'), CLOSED_RANGE('0', '9')));
// Test string: [A-Z]"_" // Test string: [A-Z]"_"
INSTANTIATE_TEST_CASE_P(A_Z_Underscore, INSTANTIATE_TEST_SUITE_P(A_Z_Underscore,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(CLOSED_RANGE('A', 'Z'), testing::Values('_'))); testing::Combine(CLOSED_RANGE('A', 'Z'), testing::Values('_')));
// Test string: [A-Z][a-z] // Test string: [A-Z][a-z]
INSTANTIATE_TEST_CASE_P(A_Z_a_z, INSTANTIATE_TEST_SUITE_P(A_Z_a_z,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(CLOSED_RANGE('A', 'Z'), CLOSED_RANGE('a', 'z'))); testing::Combine(CLOSED_RANGE('A', 'Z'), CLOSED_RANGE('a', 'z')));
// Test string: [A-Z][A-Z] // Test string: [A-Z][A-Z]
INSTANTIATE_TEST_CASE_P(A_Z_A_Z, INSTANTIATE_TEST_SUITE_P(A_Z_A_Z,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(CLOSED_RANGE('A', 'Z'), CLOSED_RANGE('A', 'Z'))); testing::Combine(CLOSED_RANGE('A', 'Z'), CLOSED_RANGE('A', 'Z')));
// Test string: [A-Z][0-9] // Test string: [A-Z][0-9]
INSTANTIATE_TEST_CASE_P(A_Z_0_9, INSTANTIATE_TEST_SUITE_P(A_Z_0_9,
DoubleLetterIdentifierTest, DoubleLetterIdentifierTest,
testing::Combine(CLOSED_RANGE('A', 'Z'), CLOSED_RANGE('0', '9'))); testing::Combine(CLOSED_RANGE('A', 'Z'), CLOSED_RANGE('0', '9')));
// The tests above cover one-letter and various combinations of two-letter // The tests above cover one-letter and various combinations of two-letter
// identifier names. This test covers all characters in a single string. // identifier names. This test covers all characters in a single string.
......
...@@ -370,7 +370,7 @@ static const LineTestParam kParams[] = { ...@@ -370,7 +370,7 @@ static const LineTestParam kParams[] = {
{"#line 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW}, {"#line 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW},
{"#line 10 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW}}; {"#line 10 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW}};
INSTANTIATE_TEST_CASE_P(All, InvalidLineTest, testing::ValuesIn(kParams)); INSTANTIATE_TEST_SUITE_P(All, InvalidLineTest, testing::ValuesIn(kParams));
struct LineExpressionTestParam struct LineExpressionTestParam
{ {
...@@ -399,6 +399,6 @@ static const LineExpressionTestParam kParamsLineExpressionTest[] = { ...@@ -399,6 +399,6 @@ static const LineExpressionTestParam kParamsLineExpressionTest[] = {
{"+9", 9}, {"(1 + 2) * 4", 12}, {"3 | 5", 7}, {"3 ^ 5", 6}, {"3 & 5", 1}, {"+9", 9}, {"(1 + 2) * 4", 12}, {"3 | 5", 7}, {"3 ^ 5", 6}, {"3 & 5", 1},
{"~5", ~5}, {"2 << 3", 16}, {"16 >> 2", 4}}; {"~5", ~5}, {"2 << 3", 16}, {"16 >> 2", 4}};
INSTANTIATE_TEST_CASE_P(All, LineExpressionTest, testing::ValuesIn(kParamsLineExpressionTest)); INSTANTIATE_TEST_SUITE_P(All, LineExpressionTest, testing::ValuesIn(kParamsLineExpressionTest));
} // namespace angle } // namespace angle
...@@ -28,11 +28,11 @@ TEST_P(InvalidNumberTest, InvalidNumberIdentified) ...@@ -28,11 +28,11 @@ TEST_P(InvalidNumberTest, InvalidNumberIdentified)
preprocess(str); preprocess(str);
} }
INSTANTIATE_TEST_CASE_P(InvalidIntegers, InvalidNumberTest, testing::Values("1a", "08", "0xG")); INSTANTIATE_TEST_SUITE_P(InvalidIntegers, InvalidNumberTest, testing::Values("1a", "08", "0xG"));
INSTANTIATE_TEST_CASE_P(InvalidFloats, INSTANTIATE_TEST_SUITE_P(InvalidFloats,
InvalidNumberTest, InvalidNumberTest,
testing::Values("1eg", "0.a", "0.1.2", ".0a", ".0.1")); testing::Values("1eg", "0.a", "0.1.2", ".0a", ".0.1"));
typedef std::tuple<const char *, char> IntegerParams; typedef std::tuple<const char *, char> IntegerParams;
class IntegerTest : public SimplePreprocessorTest, public testing::WithParamInterface<IntegerParams> class IntegerTest : public SimplePreprocessorTest, public testing::WithParamInterface<IntegerParams>
...@@ -50,25 +50,25 @@ TEST_P(IntegerTest, Identified) ...@@ -50,25 +50,25 @@ TEST_P(IntegerTest, Identified)
EXPECT_EQ(str, token.text); EXPECT_EQ(str, token.text);
} }
INSTANTIATE_TEST_CASE_P(DecimalInteger, INSTANTIATE_TEST_SUITE_P(DecimalInteger,
IntegerTest, IntegerTest,
testing::Combine(testing::Values(""), CLOSED_RANGE('0', '9'))); testing::Combine(testing::Values(""), CLOSED_RANGE('0', '9')));
INSTANTIATE_TEST_CASE_P(OctalInteger, INSTANTIATE_TEST_SUITE_P(OctalInteger,
IntegerTest, IntegerTest,
testing::Combine(testing::Values("0"), CLOSED_RANGE('0', '7'))); testing::Combine(testing::Values("0"), CLOSED_RANGE('0', '7')));
INSTANTIATE_TEST_CASE_P(HexadecimalInteger_0_9, INSTANTIATE_TEST_SUITE_P(HexadecimalInteger_0_9,
IntegerTest, IntegerTest,
testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('0', '9'))); testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('0', '9')));
INSTANTIATE_TEST_CASE_P(HexadecimalInteger_a_f, INSTANTIATE_TEST_SUITE_P(HexadecimalInteger_a_f,
IntegerTest, IntegerTest,
testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('a', 'f'))); testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('a', 'f')));
INSTANTIATE_TEST_CASE_P(HexadecimalInteger_A_F, INSTANTIATE_TEST_SUITE_P(HexadecimalInteger_A_F,
IntegerTest, IntegerTest,
testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('A', 'F'))); testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('A', 'F')));
class FloatTest : public SimplePreprocessorTest class FloatTest : public SimplePreprocessorTest
{ {
...@@ -102,12 +102,12 @@ TEST_P(FloatScientificTest, FloatIdentified) ...@@ -102,12 +102,12 @@ TEST_P(FloatScientificTest, FloatIdentified)
expectFloat(str); expectFloat(str);
} }
INSTANTIATE_TEST_CASE_P(FloatScientific, INSTANTIATE_TEST_SUITE_P(FloatScientific,
FloatScientificTest, FloatScientificTest,
testing::Combine(CLOSED_RANGE('0', '9'), testing::Combine(CLOSED_RANGE('0', '9'),
testing::Values('e', 'E'), testing::Values('e', 'E'),
testing::Values("", "+", "-"), testing::Values("", "+", "-"),
CLOSED_RANGE('0', '9'))); CLOSED_RANGE('0', '9')));
typedef std::tuple<char, char> FloatFractionParams; typedef std::tuple<char, char> FloatFractionParams;
class FloatFractionTest : public FloatTest, public testing::WithParamInterface<FloatFractionParams> class FloatFractionTest : public FloatTest, public testing::WithParamInterface<FloatFractionParams>
...@@ -132,17 +132,17 @@ TEST_P(FloatFractionTest, FloatIdentified) ...@@ -132,17 +132,17 @@ TEST_P(FloatFractionTest, FloatIdentified)
expectFloat(str); expectFloat(str);
} }
INSTANTIATE_TEST_CASE_P(FloatFraction_X_X, INSTANTIATE_TEST_SUITE_P(FloatFraction_X_X,
FloatFractionTest, FloatFractionTest,
testing::Combine(CLOSED_RANGE('0', '9'), CLOSED_RANGE('0', '9'))); testing::Combine(CLOSED_RANGE('0', '9'), CLOSED_RANGE('0', '9')));
INSTANTIATE_TEST_CASE_P(FloatFraction_0_X, INSTANTIATE_TEST_SUITE_P(FloatFraction_0_X,
FloatFractionTest, FloatFractionTest,
testing::Combine(testing::Values('\0'), CLOSED_RANGE('0', '9'))); testing::Combine(testing::Values('\0'), CLOSED_RANGE('0', '9')));
INSTANTIATE_TEST_CASE_P(FloatFraction_X_0, INSTANTIATE_TEST_SUITE_P(FloatFraction_X_0,
FloatFractionTest, FloatFractionTest,
testing::Combine(CLOSED_RANGE('0', '9'), testing::Values('\0'))); testing::Combine(CLOSED_RANGE('0', '9'), testing::Values('\0')));
// In the tests above we have tested individual parts of a float separately. // In the tests above we have tested individual parts of a float separately.
// This test has all parts of a float. // This test has all parts of a float.
......
...@@ -73,6 +73,6 @@ static const OperatorTestParam kOperators[] = {{"(", '('}, ...@@ -73,6 +73,6 @@ static const OperatorTestParam kOperators[] = {{"(", '('},
{"^=", pp::Token::OP_XOR_ASSIGN}, {"^=", pp::Token::OP_XOR_ASSIGN},
{"|=", pp::Token::OP_OR_ASSIGN}}; {"|=", pp::Token::OP_OR_ASSIGN}};
INSTANTIATE_TEST_CASE_P(All, OperatorTest, testing::ValuesIn(kOperators)); INSTANTIATE_TEST_SUITE_P(All, OperatorTest, testing::ValuesIn(kOperators));
} // namespace angle } // namespace angle
...@@ -140,13 +140,13 @@ TEST_P(InvalidPragmaTest, Identified) ...@@ -140,13 +140,13 @@ TEST_P(InvalidPragmaTest, Identified)
preprocess(str, expected); preprocess(str, expected);
} }
INSTANTIATE_TEST_CASE_P(All, INSTANTIATE_TEST_SUITE_P(All,
InvalidPragmaTest, InvalidPragmaTest,
testing::Values("#pragma 1\n", // Invalid name. testing::Values("#pragma 1\n", // Invalid name.
"#pragma foo()\n", // Missing value. "#pragma foo()\n", // Missing value.
"#pragma foo bar)\n", // Missing left paren, "#pragma foo bar)\n", // Missing left paren,
"#pragma foo(bar\n", // Missing right paren. "#pragma foo(bar\n", // Missing right paren.
"#pragma foo bar\n", // Missing parens. "#pragma foo bar\n", // Missing parens.
"#pragma foo(bar) baz\n")); // Extra tokens. "#pragma foo(bar) baz\n")); // Extra tokens.
} // namespace angle } // namespace angle
...@@ -51,7 +51,7 @@ TEST_P(SpaceCharTest, SpaceIgnored) ...@@ -51,7 +51,7 @@ TEST_P(SpaceCharTest, SpaceIgnored)
expectSpace(str); expectSpace(str);
} }
INSTANTIATE_TEST_CASE_P(SingleSpaceChar, SpaceCharTest, testing::ValuesIn(kSpaceChars)); INSTANTIATE_TEST_SUITE_P(SingleSpaceChar, SpaceCharTest, testing::ValuesIn(kSpaceChars));
// This test fixture tests the processing of a string containing consecutive // This test fixture tests the processing of a string containing consecutive
// whitespace characters. All tests in this fixture are ran with all possible // whitespace characters. All tests in this fixture are ran with all possible
...@@ -72,11 +72,11 @@ TEST_P(SpaceStringTest, SpaceIgnored) ...@@ -72,11 +72,11 @@ TEST_P(SpaceStringTest, SpaceIgnored)
expectSpace(str); expectSpace(str);
} }
INSTANTIATE_TEST_CASE_P(SpaceCharCombination, INSTANTIATE_TEST_SUITE_P(SpaceCharCombination,
SpaceStringTest, SpaceStringTest,
testing::Combine(testing::ValuesIn(kSpaceChars), testing::Combine(testing::ValuesIn(kSpaceChars),
testing::ValuesIn(kSpaceChars), testing::ValuesIn(kSpaceChars),
testing::ValuesIn(kSpaceChars))); testing::ValuesIn(kSpaceChars)));
// The tests above make sure that the space char is recorded in the // The tests above make sure that the space char is recorded in the
// next token. This test makes sure that a token is not incorrectly marked // next token. This test makes sure that a token is not incorrectly marked
......
...@@ -196,6 +196,6 @@ static const VersionTestParam kParams[] = { ...@@ -196,6 +196,6 @@ static const VersionTestParam kParams[] = {
{"#version 100 foo\n", pp::Diagnostics::PP_UNEXPECTED_TOKEN}, {"#version 100 foo\n", pp::Diagnostics::PP_UNEXPECTED_TOKEN},
{"#version 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW}}; {"#version 0xffffffff\n", pp::Diagnostics::PP_INTEGER_OVERFLOW}};
INSTANTIATE_TEST_CASE_P(All, InvalidVersionTest, testing::ValuesIn(kParams)); INSTANTIATE_TEST_SUITE_P(All, InvalidVersionTest, testing::ValuesIn(kParams));
} // namespace angle } // namespace angle
...@@ -53,12 +53,12 @@ std::vector<T> FilterTestParams(const std::vector<T> &params) ...@@ -53,12 +53,12 @@ std::vector<T> FilterTestParams(const std::vector<T> &params)
// Instantiate the test once for each extra argument. The types of all the // Instantiate the test once for each extra argument. The types of all the
// arguments must match, and getRenderer must be implemented for that type. // arguments must match, and getRenderer must be implemented for that type.
#define ANGLE_INSTANTIATE_TEST(testName, firstParam, ...) \ #define ANGLE_INSTANTIATE_TEST(testName, firstParam, ...) \
const decltype(firstParam) testName##params[] = {firstParam, ##__VA_ARGS__}; \ const decltype(firstParam) testName##params[] = {firstParam, ##__VA_ARGS__}; \
INSTANTIATE_TEST_CASE_P(, testName, \ INSTANTIATE_TEST_SUITE_P(, testName, \
testing::ValuesIn(::angle::FilterTestParams( \ testing::ValuesIn(::angle::FilterTestParams( \
testName##params, ArraySize(testName##params))), \ testName##params, ArraySize(testName##params))), \
testing::PrintToStringParamName()) testing::PrintToStringParamName())
// Checks if a config is expected to be supported by checking a system-based white list. // Checks if a config is expected to be supported by checking a system-based white list.
bool IsConfigWhitelisted(const SystemInfo &systemInfo, const PlatformParameters &param); bool IsConfigWhitelisted(const SystemInfo &systemInfo, const PlatformParameters &param);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment