| 22 | using ::testing::ValuesIn; |
| 23 | |
| 24 | TEST(OperandString, AllAreDefinedExceptVariable) { |
| 25 | // None has no string, so don't test it. |
| 26 | EXPECT_EQ(0u, SPV_OPERAND_TYPE_NONE); |
| 27 | // Start testing at enum with value 1, skipping None. |
| 28 | for (int i = 1; i < int(SPV_OPERAND_TYPE_NUM_OPERAND_TYPES); i++) { |
| 29 | const auto type = static_cast<spv_operand_type_t>(i); |
| 30 | if (spvOperandIsVariable(type)) { |
| 31 | EXPECT_STREQ("unknown", spvOperandTypeStr(type)) |
| 32 | << " variable type " << i << " has a name '" |
| 33 | << spvOperandTypeStr(type) << "'when it should not"; |
| 34 | } else { |
| 35 | EXPECT_STRNE("unknown", spvOperandTypeStr(type)) |
| 36 | << " operand type " << i << " has no name when it should"; |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | TEST(OperandIsConcreteMask, Sample) { |
| 42 | // Check a few operand types preceding the concrete mask types. |
nothing calls this directly
no test coverage detected