diff options
Diffstat (limited to 'test/core/parser/ParserStackTest.cpp')
-rw-r--r-- | test/core/parser/ParserStackTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/core/parser/ParserStackTest.cpp b/test/core/parser/ParserStackTest.cpp index 92249ff..1f4a4e2 100644 --- a/test/core/parser/ParserStackTest.cpp +++ b/test/core/parser/ParserStackTest.cpp @@ -1,6 +1,6 @@ /* - SCAENEA IDL Compiler (scidlc) - Copyright (C) 2014 Andreas Stöckel + Ousía + Copyright (C) 2014, 2015 Benjamin Paaßen, Andreas Stöckel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -72,14 +72,13 @@ static Handler* createTestHandler(const ParserContext &ctx, return new TestHandler(ctx, name, state, parentState, isChild); } -// Two nested elements used for testing static const std::multimap<std::string, HandlerDescriptor> TEST_HANDLERS{ {"document", {{STATE_NONE}, createTestHandler, STATE_DOCUMENT}}, {"body", {{STATE_DOCUMENT}, createTestHandler, STATE_BODY, true}}, {"empty", {{STATE_DOCUMENT}, createTestHandler, STATE_EMPTY}}, + {"special", {{STATE_ALL}, createTestHandler, STATE_EMPTY}}, }; - TEST(ParserStack, simpleTest) { StandaloneParserContext ctx; @@ -153,6 +152,8 @@ TEST(ParserStack, errorHandling) ASSERT_THROW(s.start("document", nullptr), OusiaException); s.start("empty", nullptr); ASSERT_THROW(s.start("body", nullptr), OusiaException); + s.start("special", nullptr); + s.end(); s.end(); s.end(); ASSERT_EQ(STATE_NONE, s.currentState()); |