summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-02 14:59:44 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-02 14:59:44 +0100
commit35554e6d32a5e66819f8a7bf869f1853e0d6fede (patch)
treea76ec73e76b644a1d20a31960947bd776044b19d /test
parent0c26390e71193947a67bdd0536915523da38f00f (diff)
continued working on the xml parser class
Diffstat (limited to 'test')
-rw-r--r--test/core/BufferedCharReaderTest.cpp4
-rw-r--r--test/core/parser/ParserStackTest.cpp9
2 files changed, 7 insertions, 6 deletions
diff --git a/test/core/BufferedCharReaderTest.cpp b/test/core/BufferedCharReaderTest.cpp
index b0955c2..b3498f7 100644
--- a/test/core/BufferedCharReaderTest.cpp
+++ b/test/core/BufferedCharReaderTest.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
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());