| 43 | } // namespace |
| 44 | |
| 45 | TEST(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 | |
| 65 | TEST(ExtractSourceTest, SimpleSource) { |
| 66 | std::string source = R"( |
nothing calls this directly
no test coverage detected