From 865034263daabbcf278447785dbcf7ee75075930 Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Fri, 9 Oct 2015 14:21:03 -0400 Subject: [PATCH] Negative test for AddressingModel, MemoryModel. --- test/TextToBinary.ModeSetting.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/TextToBinary.ModeSetting.cpp b/test/TextToBinary.ModeSetting.cpp index 6f26b3e..955ab31 100644 --- a/test/TextToBinary.ModeSetting.cpp +++ b/test/TextToBinary.ModeSetting.cpp @@ -86,6 +86,13 @@ INSTANTIATE_TEST_CASE_P(TextToBinaryMemoryModel, OpMemoryModelTest, #undef CASE // clang-format on +TEST_F(OpMemoryModelTest, WrongModel) { + EXPECT_THAT(CompileFailure("OpMemoryModel xxyyzz Simple"), + Eq("Invalid addressing model 'xxyyzz'.")); + EXPECT_THAT(CompileFailure("OpMemoryModel Logical xxyyzz"), + Eq("Invalid memory model 'xxyyzz'.")); +} + // Test OpEntryPoint // An example case for OpEntryPoint -- 2.7.4