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

Function TEST

test/tools/objdump/extract_source_test.cpp:45–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43} // namespace
44
45TEST(ExtractSourceTest, no_debug) {
46 std::string source = R"(
47 OpCapability Shader
48 OpCapability Linkage
49 OpMemoryModel Logical GLSL450
50 %void = OpTypeVoid
51 %2 = OpTypeFunction %void
52 %bool = OpTypeBool
53 %4 = OpUndef %bool
54 %5 = OpFunction %void None %2
55 %6 = OpLabel
56 OpReturn
57 OpFunctionEnd
58 )";
59
60 auto[success, result] = ExtractSource(source);
61 ASSERT_TRUE(success);
62 ASSERT_TRUE(result.size() == 0);
63}
64
65TEST(ExtractSourceTest, SimpleSource) {
66 std::string source = R"(

Callers

nothing calls this directly

Calls 2

ExtractSourceFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected