diff options
Diffstat (limited to 'test/fuzz/transformation_toggle_access_chain_instruction_test.cpp')
-rw-r--r-- | test/fuzz/transformation_toggle_access_chain_instruction_test.cpp | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/test/fuzz/transformation_toggle_access_chain_instruction_test.cpp b/test/fuzz/transformation_toggle_access_chain_instruction_test.cpp index 94ca8044..84ed20d2 100644 --- a/test/fuzz/transformation_toggle_access_chain_instruction_test.cpp +++ b/test/fuzz/transformation_toggle_access_chain_instruction_test.cpp @@ -119,71 +119,67 @@ TEST(TransformationToggleAccessChainInstructionTest, IsApplicableTest) { MakeUnique<FactManager>(context.get()), validator_options); // Tests existing access chain instructions auto instructionDescriptor = - MakeInstructionDescriptor(18, spv::Op::OpAccessChain, 0); + MakeInstructionDescriptor(18, SpvOpAccessChain, 0); auto transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_TRUE( transformation.IsApplicable(context.get(), transformation_context)); instructionDescriptor = - MakeInstructionDescriptor(20, spv::Op::OpInBoundsAccessChain, 0); + MakeInstructionDescriptor(20, SpvOpInBoundsAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_TRUE( transformation.IsApplicable(context.get(), transformation_context)); - instructionDescriptor = - MakeInstructionDescriptor(24, spv::Op::OpAccessChain, 0); + instructionDescriptor = MakeInstructionDescriptor(24, SpvOpAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_TRUE( transformation.IsApplicable(context.get(), transformation_context)); instructionDescriptor = - MakeInstructionDescriptor(26, spv::Op::OpInBoundsAccessChain, 0); + MakeInstructionDescriptor(26, SpvOpInBoundsAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_TRUE( transformation.IsApplicable(context.get(), transformation_context)); // Tests existing non-access chain instructions - instructionDescriptor = - MakeInstructionDescriptor(1, spv::Op::OpExtInstImport, 0); + instructionDescriptor = MakeInstructionDescriptor(1, SpvOpExtInstImport, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( transformation.IsApplicable(context.get(), transformation_context)); - instructionDescriptor = MakeInstructionDescriptor(5, spv::Op::OpLabel, 0); + instructionDescriptor = MakeInstructionDescriptor(5, SpvOpLabel, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( transformation.IsApplicable(context.get(), transformation_context)); instructionDescriptor = - MakeInstructionDescriptor(14, spv::Op::OpConstantComposite, 0); + MakeInstructionDescriptor(14, SpvOpConstantComposite, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( transformation.IsApplicable(context.get(), transformation_context)); // Tests the base instruction id not existing - instructionDescriptor = - MakeInstructionDescriptor(67, spv::Op::OpAccessChain, 0); + instructionDescriptor = MakeInstructionDescriptor(67, SpvOpAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( transformation.IsApplicable(context.get(), transformation_context)); - instructionDescriptor = - MakeInstructionDescriptor(68, spv::Op::OpAccessChain, 0); + instructionDescriptor = MakeInstructionDescriptor(68, SpvOpAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( transformation.IsApplicable(context.get(), transformation_context)); instructionDescriptor = - MakeInstructionDescriptor(69, spv::Op::OpInBoundsAccessChain, 0); + MakeInstructionDescriptor(69, SpvOpInBoundsAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( @@ -191,15 +187,14 @@ TEST(TransformationToggleAccessChainInstructionTest, IsApplicableTest) { // Tests there being no instruction with the desired opcode after the base // instruction id - instructionDescriptor = - MakeInstructionDescriptor(65, spv::Op::OpAccessChain, 0); + instructionDescriptor = MakeInstructionDescriptor(65, SpvOpAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( transformation.IsApplicable(context.get(), transformation_context)); instructionDescriptor = - MakeInstructionDescriptor(66, spv::Op::OpInBoundsAccessChain, 0); + MakeInstructionDescriptor(66, SpvOpInBoundsAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( @@ -208,15 +203,14 @@ TEST(TransformationToggleAccessChainInstructionTest, IsApplicableTest) { // Tests there being an instruction with the desired opcode after the base // instruction id, but the skip count associated with the instruction // descriptor being so high. - instructionDescriptor = - MakeInstructionDescriptor(11, spv::Op::OpAccessChain, 100); + instructionDescriptor = MakeInstructionDescriptor(11, SpvOpAccessChain, 100); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( transformation.IsApplicable(context.get(), transformation_context)); instructionDescriptor = - MakeInstructionDescriptor(16, spv::Op::OpInBoundsAccessChain, 100); + MakeInstructionDescriptor(16, SpvOpInBoundsAccessChain, 100); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ASSERT_FALSE( @@ -318,31 +312,29 @@ TEST(TransformationToggleAccessChainInstructionTest, ApplyTest) { TransformationContext transformation_context( MakeUnique<FactManager>(context.get()), validator_options); auto instructionDescriptor = - MakeInstructionDescriptor(18, spv::Op::OpAccessChain, 0); + MakeInstructionDescriptor(18, SpvOpAccessChain, 0); auto transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ApplyAndCheckFreshIds(transformation, context.get(), &transformation_context); instructionDescriptor = - MakeInstructionDescriptor(20, spv::Op::OpInBoundsAccessChain, 0); + MakeInstructionDescriptor(20, SpvOpInBoundsAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ApplyAndCheckFreshIds(transformation, context.get(), &transformation_context); - instructionDescriptor = - MakeInstructionDescriptor(24, spv::Op::OpAccessChain, 0); + instructionDescriptor = MakeInstructionDescriptor(24, SpvOpAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ApplyAndCheckFreshIds(transformation, context.get(), &transformation_context); instructionDescriptor = - MakeInstructionDescriptor(26, spv::Op::OpInBoundsAccessChain, 0); + MakeInstructionDescriptor(26, SpvOpInBoundsAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ApplyAndCheckFreshIds(transformation, context.get(), &transformation_context); - instructionDescriptor = - MakeInstructionDescriptor(38, spv::Op::OpAccessChain, 0); + instructionDescriptor = MakeInstructionDescriptor(38, SpvOpAccessChain, 0); transformation = TransformationToggleAccessChainInstruction(instructionDescriptor); ApplyAndCheckFreshIds(transformation, context.get(), &transformation_context); |