summaryrefslogtreecommitdiff
path: root/test/formats
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-03-02 10:35:22 +0100
committerAndreas Stöckel <andreas@somweyr.de>2015-03-02 10:35:22 +0100
commit11ee669f29e426effaf4a1e0d82baa978219e92f (patch)
tree9388d1019f281b95c014df4017f4dd54e86283e3 /test/formats
parent88afbcc2a4c4cb9956e4459cf1c5aa08e349835e (diff)
OsxmlEventParser also fills a TokenizedData instance now
Diffstat (limited to 'test/formats')
-rw-r--r--test/formats/osxml/OsxmlEventParserTest.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/formats/osxml/OsxmlEventParserTest.cpp b/test/formats/osxml/OsxmlEventParserTest.cpp
index b24a43d..d4e9443 100644
--- a/test/formats/osxml/OsxmlEventParserTest.cpp
+++ b/test/formats/osxml/OsxmlEventParserTest.cpp
@@ -69,9 +69,16 @@ public:
events.emplace_back(OsxmlEvent::RANGE_END, Variant::arrayType{});
}
- void data(const Variant &data) override
+ void data(const TokenizedData &data) override
{
- events.emplace_back(OsxmlEvent::DATA, Variant::arrayType{data});
+ Token token;
+ Variant text;
+ TokenizedDataReader reader = data.reader();
+ reader.read(token, TokenSet{}, WhitespaceMode::PRESERVE);
+ EXPECT_EQ(Tokens::Data, token.id);
+ text = Variant::fromString(token.content);
+ text.setLocation(token.getLocation());
+ events.emplace_back(OsxmlEvent::DATA, Variant::arrayType{text});
}
};