diff options
| author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-03-02 10:35:22 +0100 | 
|---|---|---|
| committer | Andreas Stöckel <andreas@somweyr.de> | 2015-03-02 10:35:22 +0100 | 
| commit | 11ee669f29e426effaf4a1e0d82baa978219e92f (patch) | |
| tree | 9388d1019f281b95c014df4017f4dd54e86283e3 /test | |
| parent | 88afbcc2a4c4cb9956e4459cf1c5aa08e349835e (diff) | |
OsxmlEventParser also fills a TokenizedData instance now
Diffstat (limited to 'test')
| -rw-r--r-- | test/formats/osxml/OsxmlEventParserTest.cpp | 11 | 
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});  	}  }; | 
