spirv-reader: rename test class for GetDecorationsFor

Bug: tint:765
Change-Id: I2b9a78baf45ba20168e23209f5d4cbf9bb231c7c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50440
Auto-Submit: David Neto <dneto@google.com>
Commit-Queue: Alan Baker <alanbaker@google.com>
Reviewed-by: Alan Baker <alanbaker@google.com>
This commit is contained in:
David Neto 2021-05-10 13:54:06 +00:00 committed by Commit Bot service account
parent 9fdfa1e323
commit 799cecedb7
1 changed files with 14 additions and 9 deletions

View File

@ -24,7 +24,9 @@ namespace {
using ::testing::Eq;
using ::testing::UnorderedElementsAre;
TEST_F(SpvParserTest, GetDecorationsFor_NotAnId) {
using SpvParserGetDecorationsTest = SpvParserTest;
TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_NotAnId) {
auto p = parser(test::Assemble(""));
EXPECT_TRUE(p->BuildAndParseInternalModule());
auto decorations = p->GetDecorationsFor(42);
@ -32,7 +34,7 @@ TEST_F(SpvParserTest, GetDecorationsFor_NotAnId) {
EXPECT_TRUE(p->error().empty());
}
TEST_F(SpvParserTest, GetDecorationsFor_NoDecorations) {
TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_NoDecorations) {
auto p = parser(test::Assemble("%1 = OpTypeVoid"));
EXPECT_TRUE(p->BuildAndParseInternalModule());
auto decorations = p->GetDecorationsFor(1);
@ -40,7 +42,7 @@ TEST_F(SpvParserTest, GetDecorationsFor_NoDecorations) {
EXPECT_TRUE(p->error().empty());
}
TEST_F(SpvParserTest, GetDecorationsFor_OneDecoration) {
TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_OneDecoration) {
auto p = parser(test::Assemble(R"(
OpDecorate %10 Block
%float = OpTypeFloat 32
@ -53,7 +55,7 @@ TEST_F(SpvParserTest, GetDecorationsFor_OneDecoration) {
EXPECT_TRUE(p->error().empty());
}
TEST_F(SpvParserTest, GetDecorationsFor_MultiDecoration) {
TEST_F(SpvParserGetDecorationsTest, GetDecorationsFor_MultiDecoration) {
auto p = parser(test::Assemble(R"(
OpDecorate %5 RelaxedPrecision
OpDecorate %5 Location 7 ; Invalid case made up for test
@ -68,7 +70,7 @@ TEST_F(SpvParserTest, GetDecorationsFor_MultiDecoration) {
EXPECT_TRUE(p->error().empty());
}
TEST_F(SpvParserTest, GetDecorationsForMember_NotAnId) {
TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_NotAnId) {
auto p = parser(test::Assemble(""));
EXPECT_TRUE(p->BuildAndParseInternalModule());
auto decorations = p->GetDecorationsForMember(42, 9);
@ -76,7 +78,7 @@ TEST_F(SpvParserTest, GetDecorationsForMember_NotAnId) {
EXPECT_TRUE(p->error().empty());
}
TEST_F(SpvParserTest, GetDecorationsForMember_NotAStruct) {
TEST_F(SpvParserGetDecorationsTest, GetDecorationsForMember_NotAStruct) {
auto p = parser(test::Assemble("%1 = OpTypeVoid"));
EXPECT_TRUE(p->BuildAndParseInternalModule());
auto decorations = p->GetDecorationsFor(1);
@ -84,7 +86,8 @@ TEST_F(SpvParserTest, GetDecorationsForMember_NotAStruct) {
EXPECT_TRUE(p->error().empty());
}
TEST_F(SpvParserTest, GetDecorationsForMember_MemberWithoutDecoration) {
TEST_F(SpvParserGetDecorationsTest,
GetDecorationsForMember_MemberWithoutDecoration) {
auto p = parser(test::Assemble(R"(
%uint = OpTypeInt 32 0
%10 = OpTypeStruct %uint
@ -96,7 +99,8 @@ TEST_F(SpvParserTest, GetDecorationsForMember_MemberWithoutDecoration) {
}
// TODO(dneto): Enable when ArrayStride is handled
TEST_F(SpvParserTest, DISABLED_GetDecorationsForMember_OneDecoration) {
TEST_F(SpvParserGetDecorationsTest,
DISABLED_GetDecorationsForMember_OneDecoration) {
auto p = parser(test::Assemble(R"(
OpMemberDecorate %10 1 ArrayStride 12
%uint = OpTypeInt 32 0
@ -114,7 +118,8 @@ TEST_F(SpvParserTest, DISABLED_GetDecorationsForMember_OneDecoration) {
// TODO(dneto): Enable when ArrayStride, MatrixStride, ColMajor are handled
// crbug.com/tint/30 for ArrayStride
// crbug.com/tint/31 for matrix layout
TEST_F(SpvParserTest, DISABLED_GetDecorationsForMember_MultiDecoration) {
TEST_F(SpvParserGetDecorationsTest,
DISABLED_GetDecorationsForMember_MultiDecoration) {
auto p = parser(test::Assemble(R"(
OpMemberDecorate %50 1 RelaxedPrecision
OpMemberDecorate %50 2 ArrayStride 16