summaryrefslogtreecommitdiff
path: root/test/formats/osxml/OsxmlEventParserTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/formats/osxml/OsxmlEventParserTest.cpp')
-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});
}
};