Commit 1d72298b by Kenneth Russell Committed by Commit Bot

Fix memory leaks in invariant tests.

Tests weren't properly destroying the compiler instance. BUG=angleproject:2094 Change-Id: I65eb5a02ba741c6f48f09f03b84ded402581e89f Reviewed-on: https://chromium-review.googlesource.com/550569Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
parent ffe00c03
...@@ -286,6 +286,7 @@ TEST(ShaderVariableTest, IllegalInvariantVarying) ...@@ -286,6 +286,7 @@ TEST(ShaderVariableTest, IllegalInvariantVarying)
EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES)); EXPECT_TRUE(sh::Compile(compiler, program1, 1, SH_VARIABLES));
EXPECT_FALSE(sh::Compile(compiler, program2, 1, SH_VARIABLES)); EXPECT_FALSE(sh::Compile(compiler, program2, 1, SH_VARIABLES));
sh::Destruct(compiler);
} }
TEST(ShaderVariableTest, InvariantLeakAcrossShaders) TEST(ShaderVariableTest, InvariantLeakAcrossShaders)
...@@ -327,6 +328,7 @@ TEST(ShaderVariableTest, InvariantLeakAcrossShaders) ...@@ -327,6 +328,7 @@ TEST(ShaderVariableTest, InvariantLeakAcrossShaders)
if (varying.name == "v_varying") if (varying.name == "v_varying")
EXPECT_FALSE(varying.isInvariant); EXPECT_FALSE(varying.isInvariant);
} }
sh::Destruct(compiler);
} }
TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders) TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders)
...@@ -368,6 +370,7 @@ TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders) ...@@ -368,6 +370,7 @@ TEST(ShaderVariableTest, GlobalInvariantLeakAcrossShaders)
if (varying.name == "v_varying") if (varying.name == "v_varying")
EXPECT_FALSE(varying.isInvariant); EXPECT_FALSE(varying.isInvariant);
} }
sh::Destruct(compiler);
} }
TEST(ShaderVariableTest, BuiltinInvariantVarying) TEST(ShaderVariableTest, BuiltinInvariantVarying)
...@@ -416,6 +419,7 @@ TEST(ShaderVariableTest, BuiltinInvariantVarying) ...@@ -416,6 +419,7 @@ TEST(ShaderVariableTest, BuiltinInvariantVarying)
EXPECT_FALSE(varying.isInvariant); EXPECT_FALSE(varying.isInvariant);
} }
EXPECT_FALSE(sh::Compile(compiler, program3, 1, SH_VARIABLES)); EXPECT_FALSE(sh::Compile(compiler, program3, 1, SH_VARIABLES));
sh::Destruct(compiler);
} }
} // namespace sh } // namespace sh
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