Negative test for ImageFormat.

This commit is contained in:
Dejan Mircevski 2015-10-13 12:54:47 -04:00 committed by David Neto
parent d062f8b097
commit 971b344150
2 changed files with 6 additions and 4 deletions

View File

@ -1339,7 +1339,7 @@ const char* spvOperandTypeStr(spv_operand_type_t type) {
case SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE:
return "sampler filter mode";
case SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT:
return "sampler image format";
return "image format";
case SPV_OPERAND_TYPE_FP_FAST_MATH_MODE:
return "floating pointer fast math mode";
case SPV_OPERAND_TYPE_FP_ROUNDING_MODE:

View File

@ -135,6 +135,11 @@ INSTANTIATE_TEST_CASE_P(
#undef CASE
// clang-format on
TEST_F(ImageFormatTest, WrongFormat) {
EXPECT_THAT(CompileFailure("%r = OpTypeImage %t 1D 2 3 0 4 xxyyzz"),
Eq("Invalid image format 'xxyyzz'."));
}
// Test AccessQualifier enums via OpTypePipe.
using OpTypePipeTest = spvtest::TextToBinaryTestBase<
@ -200,9 +205,6 @@ TEST_F(OpTypeForwardPointerTest, WrongClass) {
Eq("Invalid storage class 'xxyyzz'."));
}
// TODO(dneto): error message test for sampler addressing mode
// TODO(dneto): error message test for sampler image format
// TODO(dneto): OpTypeVoid
// TODO(dneto): OpTypeBool
// TODO(dneto): OpTypeInt