Negative test for Dim.
authorDejan Mircevski <deki@google.com>
Tue, 13 Oct 2015 15:46:09 +0000 (11:46 -0400)
committerDavid Neto <dneto@google.com>
Mon, 26 Oct 2015 16:55:33 +0000 (12:55 -0400)
test/TextToBinary.TypeDeclaration.cpp

index 86b742b..90200b3 100644 (file)
@@ -68,6 +68,11 @@ INSTANTIATE_TEST_CASE_P(
 #undef CASE
 // clang-format on
 
+TEST_F(DimTest, WrongDim) {
+  EXPECT_THAT(CompileFailure("%i = OpTypeImage %t xxyyzz 1 2 3 4 R8"),
+              Eq("Invalid dimensionality 'xxyyzz'."));
+}
+
 // Test ImageFormat enums via OpTypeImage
 
 using ImageFormatTest = spvtest::TextToBinaryTestBase<