summaryrefslogtreecommitdiff
path: root/test/io
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-08-06 10:49:08 +0200
committerljfa-ag <ljfa-ag@web.de>2015-08-06 10:49:08 +0200
commit7e3bd6ce1cc07dab0b5f7aaf30d213af802dbd0a (patch)
tree43353981315184b1e96949c82594d0ef7dcf3bc9 /test/io
parent9993ebf57fa5822d4d573b359220610962b4a78b (diff)
downloadProject-Tick-7e3bd6ce1cc07dab0b5f7aaf30d213af802dbd0a.tar.gz
Project-Tick-7e3bd6ce1cc07dab0b5f7aaf30d213af802dbd0a.zip
Add stream_reader::read_tag method
Diffstat (limited to 'test/io')
-rw-r--r--test/io/read_test.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/io/read_test.cpp b/test/io/read_test.cpp
index a6de378e1d..0b29483f1e 100644
--- a/test/io/read_test.cpp
+++ b/test/io/read_test.cpp
@@ -104,12 +104,11 @@ void test_read_bigtest()
ASSERT(file);
nbt::io::stream_reader reader(file);
- ASSERT(reader.read_type() == tag_type::Compound);
- ASSERT(reader.read_string() == "Level");
- auto tagptr = reader.read_payload(tag_type::Compound);
+ auto pair = reader.read_tag();
+ ASSERT(pair.first == "Level");
- ASSERT(tagptr->get_type() == tag_type::Compound);
- const tag_compound& comp = tagptr->as<tag_compound>();
+ ASSERT(pair.second->get_type() == tag_type::Compound);
+ const tag_compound& comp = pair.second->as<tag_compound>();
ASSERT(comp.size() == 13);