diff options
Diffstat (limited to 'test/link/entry_points_test.cpp')
-rw-r--r-- | test/link/entry_points_test.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/link/entry_points_test.cpp b/test/link/entry_points_test.cpp index bac8e02e..df7ea20c 100644 --- a/test/link/entry_points_test.cpp +++ b/test/link/entry_points_test.cpp @@ -26,6 +26,8 @@ class EntryPoints : public spvtest::LinkerTest {}; TEST_F(EntryPoints, SameModelDifferentName) { const std::string body1 = R"( +OpCapability Shader +OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %3 "foo" %1 = OpTypeVoid %2 = OpTypeFunction %1 @@ -33,6 +35,8 @@ OpEntryPoint GLCompute %3 "foo" OpFunctionEnd )"; const std::string body2 = R"( +OpCapability Shader +OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %3 "bar" %1 = OpTypeVoid %2 = OpTypeFunction %1 @@ -41,12 +45,15 @@ OpFunctionEnd )"; spvtest::Binary linked_binary; - EXPECT_EQ(SPV_SUCCESS, AssembleAndLink({body1, body2}, &linked_binary)); + ASSERT_EQ(SPV_SUCCESS, AssembleAndLink({body1, body2}, &linked_binary)) + << GetErrorMessage(); EXPECT_THAT(GetErrorMessage(), std::string()); } TEST_F(EntryPoints, DifferentModelSameName) { const std::string body1 = R"( +OpCapability Shader +OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %3 "foo" %1 = OpTypeVoid %2 = OpTypeFunction %1 @@ -54,6 +61,8 @@ OpEntryPoint GLCompute %3 "foo" OpFunctionEnd )"; const std::string body2 = R"( +OpCapability Shader +OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %3 "foo" %1 = OpTypeVoid %2 = OpTypeFunction %1 @@ -62,12 +71,15 @@ OpFunctionEnd )"; spvtest::Binary linked_binary; - EXPECT_EQ(SPV_SUCCESS, AssembleAndLink({body1, body2}, &linked_binary)); + ASSERT_EQ(SPV_SUCCESS, AssembleAndLink({body1, body2}, &linked_binary)) + << GetErrorMessage(); EXPECT_THAT(GetErrorMessage(), std::string()); } TEST_F(EntryPoints, SameModelAndName) { const std::string body1 = R"( +OpCapability Shader +OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %3 "foo" %1 = OpTypeVoid %2 = OpTypeFunction %1 @@ -75,6 +87,8 @@ OpEntryPoint GLCompute %3 "foo" OpFunctionEnd )"; const std::string body2 = R"( +OpCapability Shader +OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %3 "foo" %1 = OpTypeVoid %2 = OpTypeFunction %1 |