@@ -360,11 +360,17 @@ TEST(@"-[finishedParsing]", [parser finishedParsing]) TEST(@"Parsing whitespaces after the document", R([parser parseString: @" \t\r\n "])) - EXPECT_EXCEPTION(@"Detection of junk after the document", + TEST(@"Parsing comments after the document", + R([parser parseString: @" \t\r\n "])) + + EXPECT_EXCEPTION(@"Detection of junk after the document #1", OFMalformedXMLException, [parser parseString: @"a"]) + + EXPECT_EXCEPTION(@"Detection of junk after the document #2", + OFMalformedXMLException, [parser parseString: @"