Commit 273175cd by Jamie Madill Committed by Commit Bot

Fix Regex in DebugShaderPrecisionTest.

One regex had an extra parenthesis. Also confirms that we can use raw string literals to produce more readable regexes. Bug: angleproject:3162 Change-Id: I82e6bc622a8fa3d9f6424c53cb7dcb4dddde368a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1821938Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent a3f1981d
......@@ -306,7 +306,7 @@ TEST_F(DebugShaderPrecisionTest, CompoundAddFunction)
foundInHLSLCode("float4 angle_compound_add_frm(inout float4 x, in float4 y) {\n"
" x = angle_frm(angle_frm(x) + y);"));
ASSERT_TRUE(foundInAllGLSLCode("angle_compound_add_frm(_uv, angle_frm(_uu2));"));
ASSERT_TRUE(foundInHLSLCodeRegex("angle_compound_add_frm\\(_v(\\d)*, angle_frm\\(_u2\\)\\);"));
ASSERT_TRUE(foundInHLSLCodeRegex(R"(angle_compound_add_frm\(_v(\d)*, angle_frm\(_u2\)\);)"));
ASSERT_TRUE(notFoundInCode("+="));
}
......@@ -1055,7 +1055,7 @@ TEST_F(DebugShaderPrecisionTest, ModfOutParameter)
"}\n";
compile(shaderString);
ASSERT_TRUE(foundInAllGLSLCode("modf(angle_frm(_uu), _uo)"));
ASSERT_TRUE(foundInHLSLCodeRegex("modf\\(angle_frm\\(_u\\), _o(\\d)*)"));
ASSERT_TRUE(foundInHLSLCodeRegex(R"(modf\(angle_frm\(_u\), _o(\d)*)"));
}
#if defined(ANGLE_ENABLE_HLSL)
......
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