| 29 | using testing::Eq; |
| 30 | |
| 31 | TEST_F(TextToBinaryTest, Whitespace) { |
| 32 | std::string input = R"( |
| 33 | ; I'm a proud comment at the beginning of the file |
| 34 | ; I hide: OpCapability Shader |
| 35 | OpMemoryModel Logical Simple ; comment after instruction |
| 36 | ;;;;;;;; many ;'s |
| 37 | %glsl450 = OpExtInstImport "GLSL.std.450" |
| 38 | ; comment indented |
| 39 | )"; |
| 40 | |
| 41 | EXPECT_THAT( |
| 42 | CompiledInstructions(input), |
| 43 | Eq(Concatenate({MakeInstruction(spv::Op::OpMemoryModel, |
| 44 | {uint32_t(spv::AddressingModel::Logical), |
| 45 | uint32_t(spv::MemoryModel::Simple)}), |
| 46 | MakeInstruction(spv::Op::OpExtInstImport, {1}, |
| 47 | MakeVector("GLSL.std.450"))}))); |
| 48 | } |
| 49 | |
| 50 | } // namespace |
| 51 | } // namespace spvtools |
nothing calls this directly
no test coverage detected