MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / TEST_F

Function TEST_F

test/comment_test.cpp:31–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29using testing::Eq;
30
31TEST_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

Callers

nothing calls this directly

Calls 3

ConcatenateFunction · 0.85
MakeInstructionFunction · 0.85
MakeVectorFunction · 0.85

Tested by

no test coverage detected