Commit 43ce600c by Olli Etuaho

Fix a bunch of mistakes in MalformedShaderTest

A number of mistakes had slipped in to this test that made the compilation of some shaders always fail regardless of the semantic checks applied by the parser. TEST=angle_unittests BUG=angleproject:941 Change-Id: I9906792e2c7fe3805288255b855afb46840a77a7 Reviewed-on: https://chromium-review.googlesource.com/264811Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 4176cd64
......@@ -182,7 +182,7 @@ TEST_F(MalformedShaderTest, CompareStructsContainingSamplers)
TEST_F(MalformedShaderTest, AssignStructsContainingSamplers)
{
const std::string &shaderString =
"#version 300 es;\n"
"#version 300 es\n"
"precision mediump float;\n"
"struct s { sampler2D foo; };\n"
"uniform s a;\n"
......@@ -218,11 +218,11 @@ TEST_F(MalformedShaderTest, ArrayWithNoSizeInInitializerList)
TEST_F(MalformedShaderTest, ConstVarNotInitialized)
{
const std::string &shaderString =
"#version 300 es;"
"#version 300 es\n"
"precision mediump float;\n"
"out vec4 my_FragColor;\n"
"void main() {\n"
" const float a;"
" const float a;\n"
" my_FragColor = vec4(1.0);\n"
"}\n";
if (compile(shaderString))
......@@ -240,14 +240,14 @@ TEST_F(MalformedShaderTest, ConstVarNotInitialized)
TEST_F(MalformedShaderTest, ConstStructNotInitialized)
{
const std::string &shaderString =
"#version 300 es;"
"#version 300 es\n"
"precision mediump float;\n"
"struct S {\n"
" float a[3];\n"
"};\n"
"out vec4 my_FragColor;\n"
"void main() {\n"
" const S b;"
" const S b;\n"
" my_FragColor = vec4(1.0);\n"
"}\n";
if (compile(shaderString))
......@@ -265,11 +265,11 @@ TEST_F(MalformedShaderTest, ConstStructNotInitialized)
TEST_F(MalformedShaderTest, ConstArrayNotInitialized)
{
const std::string &shaderString =
"#version 300 es;"
"#version 300 es\n"
"precision mediump float;\n"
"out vec4 my_FragColor;\n"
"void main() {\n"
" const float a[3];"
" const float a[3];\n"
" my_FragColor = vec4(1.0);\n"
"}\n";
if (compile(shaderString))
......
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