Negative test for LinkageType.
authorDejan Mircevski <deki@google.com>
Tue, 13 Oct 2015 19:22:01 +0000 (15:22 -0400)
committerDavid Neto <dneto@google.com>
Mon, 26 Oct 2015 16:55:33 +0000 (12:55 -0400)
test/TextToBinary.Annotation.cpp

index 9103ad2..0025886 100644 (file)
@@ -311,6 +311,11 @@ INSTANTIATE_TEST_CASE_P(TextToBinaryDecorateLinkage, OpDecorateLinkageTest,
 #undef CASE
 // clang-format on
 
+TEST_F(OpDecorateLinkageTest, WrongType) {
+  EXPECT_THAT(CompileFailure("OpDecorate %1 LinkageAttributes \"foo\" xxyyzz"),
+              Eq("Invalid linkage type 'xxyyzz'."));
+}
+
 // Test OpGroupMemberDecorate
 
 TEST_F(TextToBinaryTest, GroupMemberDecorateGoodOneTarget) {