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

Function TEST_P

test/opt/def_use_test.cpp:190–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188using ParseDefUseTest = ::testing::TestWithParam<ParseDefUseCase>;
189
190TEST_P(ParseDefUseTest, Case) {
191 const auto& tc = GetParam();
192
193 // Build module.
194 const std::vector<const char*> text = {tc.text};
195 std::unique_ptr<IRContext> context =
196 BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, JoinAllInsts(text),
197 SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS);
198 ASSERT_NE(nullptr, context);
199
200 // Analyze def and use.
201 DefUseManager manager(context->module());
202
203 CheckDef(tc.du, manager.id_to_defs());
204 CheckUse(tc.du, &manager, context->module()->IdBound());
205}
206
207// clang-format off
208INSTANTIATE_TEST_SUITE_P(

Callers

nothing calls this directly

Calls 15

JoinAllInstsFunction · 0.85
CheckDefFunction · 0.85
CheckUseFunction · 0.85
DisassembleModuleFunction · 0.85
DisassembleInstFunction · 0.85
InvalidateAnalysesMethod · 0.80
ReplaceAllUsesWithMethod · 0.80
KillDefMethod · 0.80
GetAnnotationsMethod · 0.80
BuildModuleFunction · 0.70
moduleMethod · 0.45
IdBoundMethod · 0.45

Tested by

no test coverage detected