YAML: Fix crash in the skip method of KeyValueNode class.
[oota-llvm.git] / unittests / Support / YAMLParserTest.cpp
index 823a0d6e3e03e4462fa02a7b2bbccea24ffc0d1d..918c2059ea63d55ddfc7bbeecf0f2032521e2db8 100644 (file)
@@ -141,6 +141,10 @@ TEST(YAMLParser, HandlesEndOfFileGracefully) {
   ExpectParseError("In object hitting EOF", "{\"\"");
 }
 
+TEST(YAMLParser, HandlesNullValuesInKeyValueNodesGracefully) {
+  ExpectParseError("KeyValueNode with null value", "test: '");
+}
+
 // Checks that the given string can be parsed into an identical string inside
 // of an array.
 static void ExpectCanParseString(StringRef String) {