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

Function TEST_F

test/val/val_validation_state_test.cpp:124–129  ·  view source on GitHub ↗

Tests that the instruction count in ValidationState is correct.

Source from the content-addressed store, hash-verified

122
123// Tests that the instruction count in ValidationState is correct.
124TEST_F(ValidationStateTest, CheckNumInstructions) {
125 std::string spirv = std::string(kHeader) + "%int = OpTypeInt 32 0";
126 CompileSuccessfully(spirv);
127 EXPECT_EQ(SPV_SUCCESS, ValidateAndRetrieveValidationState());
128 EXPECT_EQ(size_t(4), vstate_->ordered_instructions().size());
129}
130
131// Tests that the number of global variables in ValidationState is correct.
132TEST_F(ValidationStateTest, CheckNumGlobalVars) {

Callers

nothing calls this directly

Calls 8

num_global_varsMethod · 0.80
num_local_varsMethod · 0.80
getIdBoundMethod · 0.80
entry_pointsMethod · 0.80
FindDefMethod · 0.80
sizeMethod · 0.45
opcodeMethod · 0.45

Tested by

no test coverage detected