diff --git a/src/tint/reader/spirv/parser_impl_get_decorations_test.cc b/src/tint/reader/spirv/parser_impl_get_decorations_test.cc index cbc384fda0..43e6e2dc83 100644 --- a/src/tint/reader/spirv/parser_impl_get_decorations_test.cc +++ b/src/tint/reader/spirv/parser_impl_get_decorations_test.cc @@ -28,7 +28,7 @@ const char* kSkipReason = "This example is deliberately a SPIR-V fragment"; TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_NotAnId) { auto p = parser(test::Assemble("")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsFor(42); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty()); @@ -37,7 +37,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_NotAnId) { TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_NoDecorations) { auto p = parser(test::Assemble("%1 = OpTypeVoid")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsFor(1); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty()); @@ -50,7 +50,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_OneDecoration) { %float = OpTypeFloat 32 %10 = OpTypeStruct %float )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsFor(10); EXPECT_THAT(decorations, UnorderedElementsAre(Decoration{uint32_t(spv::Decoration::Block)})); EXPECT_TRUE(p->error().empty()); @@ -64,7 +64,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_Duplicate) { %float = OpTypeFloat 32 %10 = OpTypeStruct %float )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsFor(10); EXPECT_THAT(decorations, UnorderedElementsAre(Decoration{uint32_t(spv::Decoration::Block)})); EXPECT_TRUE(p->error().empty()); @@ -78,7 +78,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_MultiDecoration) { %float = OpTypeFloat 32 %5 = OpConstant %float 3.14 )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsFor(5); EXPECT_THAT(decorations, UnorderedElementsAre(Decoration{uint32_t(spv::Decoration::RelaxedPrecision)}, @@ -89,7 +89,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_MultiDecoration) { TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_NotAnId) { auto p = parser(test::Assemble("")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsForMember(42, 9); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty()); @@ -98,7 +98,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_NotAnId) { TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_NotAStruct) { auto p = parser(test::Assemble("%1 = OpTypeVoid")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsFor(1); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty()); @@ -110,7 +110,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_MemberWithoutDecorat %uint = OpTypeInt 32 0 %10 = OpTypeStruct %uint )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsForMember(10, 0); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty()); @@ -123,7 +123,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_RelaxedPrecision) { %float = OpTypeFloat 32 %10 = OpTypeStruct %float )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()) << p->error(); + ASSERT_TRUE(p->BuildAndParseInternalModule()) << p->error(); auto decorations = p->GetDecorationsForMember(10, 0); EXPECT_THAT(decorations, UnorderedElementsAre(Decoration{uint32_t(spv::Decoration::RelaxedPrecision)})); @@ -138,7 +138,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_Duplicate) { %float = OpTypeFloat 32 %10 = OpTypeStruct %float )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()) << p->error(); + ASSERT_TRUE(p->BuildAndParseInternalModule()) << p->error(); auto decorations = p->GetDecorationsForMember(10, 0); EXPECT_THAT(decorations, UnorderedElementsAre(Decoration{uint32_t(spv::Decoration::RelaxedPrecision)})); @@ -155,7 +155,7 @@ TEST_F(SpvParserGetDecorationsTest, DISABLED_GetDecorationsForMember_OneDecorati %arr = OpTypeArray %uint %uint_2 %10 = OpTypeStruct %uint %arr )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()) << p->error(); + ASSERT_TRUE(p->BuildAndParseInternalModule()) << p->error(); auto decorations = p->GetDecorationsForMember(10, 1); EXPECT_THAT(decorations, UnorderedElementsAre(Decoration{uint32_t(spv::Decoration::ArrayStride), 12})); @@ -179,7 +179,7 @@ TEST_F(SpvParserGetDecorationsTest, DISABLED_GetDecorationsForMember_MultiDecora %arr = OpTypeArray %mat %uint_2 %50 = OpTypeStruct %uint %float %arr )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()) << p->error(); + ASSERT_TRUE(p->BuildAndParseInternalModule()) << p->error(); EXPECT_TRUE(p->GetDecorationsForMember(50, 0).empty()); EXPECT_THAT(p->GetDecorationsForMember(50, 1), @@ -199,7 +199,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_Restrict) { %ptr = OpTypePointer Workgroup %float %10 = OpVariable %ptr Workgroup )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsFor(10); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty()); @@ -215,7 +215,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_Restrict) { %float = OpTypeFloat 32 %10 = OpTypeStruct %float )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()); + ASSERT_TRUE(p->BuildAndParseInternalModule()); auto decorations = p->GetDecorationsForMember(10, 0); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty()); @@ -230,7 +230,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_RestrictPointer) { %ptr = OpTypePointer Workgroup %float %10 = OpVariable %ptr Workgroup )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()) << p->error(); + ASSERT_TRUE(p->BuildAndParseInternalModule()) << p->error(); auto decorations = p->GetDecorationsFor(10); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty()); @@ -246,7 +246,7 @@ TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_RestrictPointer) { %float = OpTypeFloat 32 %10 = OpTypeStruct %float )")); - EXPECT_TRUE(p->BuildAndParseInternalModule()) << p->error(); + ASSERT_TRUE(p->BuildAndParseInternalModule()) << p->error(); auto decorations = p->GetDecorationsFor(10); EXPECT_TRUE(decorations.empty()); EXPECT_TRUE(p->error().empty());