summaryrefslogtreecommitdiff
path: root/unittests/Support/YAMLIOTest.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
commit67c32a98315f785a9ec9d531c1f571a0196c7463 (patch)
tree4abb9cbeecc7901726dd0b4a37369596c852e9ef /unittests/Support/YAMLIOTest.cpp
parent9f61947910e6ab40de38e6b4034751ef1513200f (diff)
Diffstat (limited to 'unittests/Support/YAMLIOTest.cpp')
-rw-r--r--unittests/Support/YAMLIOTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/Support/YAMLIOTest.cpp b/unittests/Support/YAMLIOTest.cpp
index 8aed98012f10f..074e27f8318dc 100644
--- a/unittests/Support/YAMLIOTest.cpp
+++ b/unittests/Support/YAMLIOTest.cpp
@@ -84,6 +84,13 @@ TEST(YAMLIO, TestMapRead) {
}
}
+TEST(YAMLIO, TestMalformedMapRead) {
+ FooBar doc;
+ Input yin("{foo: 3; bar: 5}", nullptr, suppressErrorMessages);
+ yin >> doc;
+ EXPECT_TRUE(!!yin.error());
+}
+
//
// Test the reading of a yaml sequence of mappings
//