From 72dceba671b7d0c7b3e296cc16973a3ab168b68c Mon Sep 17 00:00:00 2001 From: jbeder Date: Thu, 29 Oct 2009 20:45:20 +0000 Subject: [PATCH] Added test --- test/spectests.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/test/spectests.cpp b/test/spectests.cpp index fb5150d..d2a8e64 100644 --- a/test/spectests.cpp +++ b/test/spectests.cpp @@ -459,7 +459,7 @@ namespace Test { return true; } - // TODO: 2.19 - 2.22 tags + // TODO: 2.19 - 2.22 schema tags // 2.23 TEST VariousExplicitTags() @@ -765,7 +765,16 @@ namespace Test { return true; } - // TODO: 5.5 comment only + // 5.5 + TEST CommentIndicator() + { + std::string input = + "# Comment only."; + + PARSE(doc, input); + YAML_ASSERT(doc.size() == 0); + return true; + } // 5.6 TEST NodePropertyIndicators() @@ -1060,10 +1069,9 @@ namespace Test { " # Comment\n" " \n" "\n"; - std::stringstream stream(input); - YAML::Parser parser(stream); - YAML_ASSERT(!parser); + PARSE(doc, input); + YAML_ASSERT(doc.size() == 0); return true; }