Negative test for BuiltIn.

This commit is contained in:
Dejan Mircevski 2015-10-13 15:39:38 -04:00 committed by David Neto
parent 10fa49cd4b
commit d7b0f83bd1
2 changed files with 6 additions and 1 deletions

View File

@ -1353,7 +1353,7 @@ const char* spvOperandTypeStr(spv_operand_type_t type) {
case SPV_OPERAND_TYPE_DECORATION:
return "decoration";
case SPV_OPERAND_TYPE_BUILT_IN:
return "built in";
return "built-in";
case SPV_OPERAND_TYPE_SELECTION_CONTROL:
return "selection control";
case SPV_OPERAND_TYPE_LOOP_CONTROL:

View File

@ -186,6 +186,11 @@ INSTANTIATE_TEST_CASE_P(TextToBinaryDecorateBuiltIn, OpDecorateEnumTest,
#undef CASE
// clang-format on
TEST_F(OpDecorateEnumTest, WrongBuiltIn) {
EXPECT_THAT(CompileFailure("OpDecorate %1 BuiltIn xxyyzz"),
Eq("Invalid built-in 'xxyyzz'."));
}
// Test OpDecorate FuncParamAttr
// clang-format off
#define CASE(NAME) \