diff options
Diffstat (limited to 'test/text_to_binary.image_test.cpp')
-rw-r--r-- | test/text_to_binary.image_test.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/text_to_binary.image_test.cpp b/test/text_to_binary.image_test.cpp index 3e7a560a..8d8ff432 100644 --- a/test/text_to_binary.image_test.cpp +++ b/test/text_to_binary.image_test.cpp @@ -45,11 +45,11 @@ TEST_P(ImageOperandsTest, Sample) { const std::string input = "%2 = OpImageFetch %1 %3 %4" + GetParam().image_operands + "\n"; EXPECT_THAT(CompiledInstructions(input), - Eq(MakeInstruction(spv::Op::OpImageFetch, {1, 2, 3, 4}, + Eq(MakeInstruction(SpvOpImageFetch, {1, 2, 3, 4}, GetParam().expected_mask_and_operands))); } -#define MASK(NAME) uint32_t(spv::ImageOperandsMask::NAME) +#define MASK(NAME) SpvImageOperands##NAME##Mask INSTANTIATE_TEST_SUITE_P( TextToBinaryImageOperandsAny, ImageOperandsTest, ::testing::ValuesIn(std::vector<ImageOperandsCase>{ @@ -68,7 +68,7 @@ INSTANTIATE_TEST_SUITE_P( {" MinLod %5", {MASK(MinLod), 5}}, })); #undef MASK -#define MASK(NAME) static_cast<uint32_t>(spv::ImageOperandsMask::NAME) +#define MASK(NAME) static_cast<uint32_t>(SpvImageOperands##NAME##Mask) INSTANTIATE_TEST_SUITE_P( TextToBinaryImageOperandsCombination, ImageOperandsTest, ::testing::ValuesIn(std::vector<ImageOperandsCase>{ @@ -110,7 +110,7 @@ using OpImageTest = TextToBinaryTest; TEST_F(OpImageTest, Valid) { const std::string input = "%2 = OpImage %1 %3\n"; EXPECT_THAT(CompiledInstructions(input), - Eq(MakeInstruction(spv::Op::OpImage, {1, 2, 3}))); + Eq(MakeInstruction(SpvOpImage, {1, 2, 3}))); // Test the disassembler. EXPECT_THAT(EncodeAndDecodeSuccessfully(input), input); @@ -153,7 +153,7 @@ using OpImageSparseReadTest = TextToBinaryTest; TEST_F(OpImageSparseReadTest, OnlyRequiredOperands) { const std::string input = "%2 = OpImageSparseRead %1 %3 %4\n"; EXPECT_THAT(CompiledInstructions(input), - Eq(MakeInstruction(spv::Op::OpImageSparseRead, {1, 2, 3, 4}))); + Eq(MakeInstruction(SpvOpImageSparseRead, {1, 2, 3, 4}))); // Test the disassembler. EXPECT_THAT(EncodeAndDecodeSuccessfully(input), input); } @@ -167,13 +167,13 @@ TEST_P(ImageSparseReadImageOperandsTest, Sample) { const std::string input = "%2 = OpImageSparseRead %1 %3 %4" + GetParam().image_operands + "\n"; EXPECT_THAT(CompiledInstructions(input), - Eq(MakeInstruction(spv::Op::OpImageSparseRead, {1, 2, 3, 4}, + Eq(MakeInstruction(SpvOpImageSparseRead, {1, 2, 3, 4}, GetParam().expected_mask_and_operands))); // Test the disassembler. EXPECT_THAT(EncodeAndDecodeSuccessfully(input), input); } -#define MASK(NAME) uint32_t(spv::ImageOperandsMask::NAME) +#define MASK(NAME) SpvImageOperands##NAME##Mask INSTANTIATE_TEST_SUITE_P(ImageSparseReadImageOperandsAny, ImageSparseReadImageOperandsTest, ::testing::ValuesIn(std::vector<ImageOperandsCase>{ @@ -190,7 +190,7 @@ INSTANTIATE_TEST_SUITE_P(ImageSparseReadImageOperandsAny, {" MinLod %5", {MASK(MinLod), 5}}, })); #undef MASK -#define MASK(NAME) static_cast<uint32_t>(spv::ImageOperandsMask::NAME) +#define MASK(NAME) static_cast<uint32_t>(SpvImageOperands##NAME##Mask) INSTANTIATE_TEST_SUITE_P( ImageSparseReadImageOperandsCombination, ImageSparseReadImageOperandsTest, ::testing::ValuesIn(std::vector<ImageOperandsCase>{ |