Commit ad782a84 by Jamie Madill Committed by Commit Bot

Tests: Use "__" to delineate test config names.

This will allow the ANGLE test runner to identify test configs for tests that use parameterization to break up different test permutations with the same config. Note that GoogleTest doesn't allow for anything other than alphanumeric characters or "_" in test names. Bug: angleproject:3162 Change-Id: Iee215fbd8c397eef04dce0269da9b58ec568fce7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2280402Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 0757a61a
...@@ -157,6 +157,12 @@ std::string MaskedScissoredClearVariationsTestPrint( ...@@ -157,6 +157,12 @@ std::string MaskedScissoredClearVariationsTestPrint(
ParseMaskedScissoredClearVariationsTestParams(params, &clearColor, &clearDepth, &clearStencil, ParseMaskedScissoredClearVariationsTestParams(params, &clearColor, &clearDepth, &clearStencil,
&maskColor, &maskDepth, &maskStencil, &scissor); &maskColor, &maskDepth, &maskStencil, &scissor);
if (scissor || clearColor || clearDepth || clearStencil || maskColor || maskDepth ||
maskStencil)
{
out << "_";
}
if (scissor) if (scissor)
{ {
out << "_scissored"; out << "_scissored";
......
...@@ -123,7 +123,7 @@ std::string CopyTextureVariationsTestPrint( ...@@ -123,7 +123,7 @@ std::string CopyTextureVariationsTestPrint(
const CopyTextureVariationsTestParams &params = paramsInfo.param; const CopyTextureVariationsTestParams &params = paramsInfo.param;
std::ostringstream out; std::ostringstream out;
out << std::get<0>(params) << '_'; out << std::get<0>(params) << "__";
switch (std::get<1>(params)) switch (std::get<1>(params))
{ {
......
...@@ -78,12 +78,12 @@ struct PrintToStringParamName ...@@ -78,12 +78,12 @@ struct PrintToStringParamName
const ::testing::TestParamInfo<DrawBaseVertexBaseInstanceTestParams> &info) const const ::testing::TestParamInfo<DrawBaseVertexBaseInstanceTestParams> &info) const
{ {
::std::stringstream ss; ::std::stringstream ss;
ss << (std::get<3>(info.param) == BufferDataUsageOption::StaticDraw ? "StaticDraw_" ss << std::get<0>(info.param) << "_"
: "DynamicDraw_") << (std::get<3>(info.param) == BufferDataUsageOption::StaticDraw ? "_StaticDraw"
<< (std::get<2>(info.param) == BaseInstanceOption::UseBaseInstance ? "UseBaseInstance_" : "_DynamicDraw")
<< (std::get<2>(info.param) == BaseInstanceOption::UseBaseInstance ? "_UseBaseInstance"
: "") : "")
<< (std::get<1>(info.param) == BaseVertexOption::UseBaseVertex ? "UseBaseVertex_" : "") << (std::get<1>(info.param) == BaseVertexOption::UseBaseVertex ? "_UseBaseVertex" : "");
<< std::get<0>(info.param);
return ss.str(); return ss.str();
} }
}; };
......
...@@ -71,7 +71,7 @@ std::string DrawBaseVertexVariantsTestPrint( ...@@ -71,7 +71,7 @@ std::string DrawBaseVertexVariantsTestPrint(
const DrawBaseVertexVariantsTestParams &params = paramsInfo.param; const DrawBaseVertexVariantsTestParams &params = paramsInfo.param;
std::ostringstream out; std::ostringstream out;
out << std::get<0>(params) << '_'; out << std::get<0>(params) << "__";
switch (std::get<1>(params)) switch (std::get<1>(params))
{ {
......
...@@ -69,9 +69,9 @@ struct PrintToStringParamName ...@@ -69,9 +69,9 @@ struct PrintToStringParamName
std::string operator()(const ::testing::TestParamInfo<MultiDrawTestParams> &info) const std::string operator()(const ::testing::TestParamInfo<MultiDrawTestParams> &info) const
{ {
::std::stringstream ss; ::std::stringstream ss;
ss << (std::get<2>(info.param) == InstancingOption::UseInstancing ? "Instanced_" : "") ss << std::get<0>(info.param)
<< (std::get<1>(info.param) == DrawIDOption::UseDrawID ? "DrawID_" : "") << (std::get<2>(info.param) == InstancingOption::UseInstancing ? "__Instanced" : "")
<< std::get<0>(info.param); << (std::get<1>(info.param) == DrawIDOption::UseDrawID ? "__DrawID" : "");
return ss.str(); return ss.str();
} }
}; };
......
...@@ -219,7 +219,7 @@ void AttachMultiviewTextures(GLenum target, ...@@ -219,7 +219,7 @@ void AttachMultiviewTextures(GLenum target,
std::ostream &operator<<(std::ostream &os, const MultiviewImplementationParams &params) std::ostream &operator<<(std::ostream &os, const MultiviewImplementationParams &params)
{ {
const PlatformParameters &base = static_cast<const PlatformParameters &>(params); const PlatformParameters &base = static_cast<const PlatformParameters &>(params);
os << base; os << base << "_";
if (params.mForceUseGeometryShaderOnD3D) if (params.mForceUseGeometryShaderOnD3D)
{ {
os << "_force_geom_shader"; os << "_force_geom_shader";
......
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