summaryrefslogtreecommitdiff
path: root/test/write_test.cpp
diff options
context:
space:
mode:
authorljfa <ljfa-ag@web.de>2015-08-13 11:31:57 +0200
committerljfa <ljfa-ag@web.de>2015-08-13 11:31:57 +0200
commitaac94b91ad83ad8f7832976e6da55d15de6e54e1 (patch)
tree9caa79222933a300354c1cd2224915da471e94f5 /test/write_test.cpp
parentbaf4a77df0ac95386b80bd915c2926c86e2c5a46 (diff)
downloadProject-Tick-aac94b91ad83ad8f7832976e6da55d15de6e54e1.tar.gz
Project-Tick-aac94b91ad83ad8f7832976e6da55d15de6e54e1.zip
Add io::read_tag and write_tag functions
Diffstat (limited to 'test/write_test.cpp')
-rw-r--r--test/write_test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/write_test.cpp b/test/write_test.cpp
index 78d6d8eaa6..d6eac53a53 100644
--- a/test/write_test.cpp
+++ b/test/write_test.cpp
@@ -206,25 +206,25 @@ void test_write_bigtest()
written tag.
Smaller-grained tests are already done above. */
std::ifstream file("bigtest_uncompr", std::ios::binary);
- const auto orig_pair = io::stream_reader(file).read_compound();
+ const auto orig_pair = io::read_compound(file);
std::stringstream sstr;
//Write into stream in Big Endian
- io::stream_writer(sstr).write_tag(orig_pair.first, *orig_pair.second);
+ io::write_tag(orig_pair.first, *orig_pair.second, sstr);
ASSERT(sstr);
//Read from stream in Big Endian and compare
- auto written_pair = io::stream_reader(sstr).read_compound();
+ auto written_pair = io::read_compound(sstr);
ASSERT(orig_pair.first == written_pair.first);
ASSERT(*orig_pair.second == *written_pair.second);
sstr.str(""); //Reset and reuse stream
//Write into stream in Little Endian
- io::stream_writer(sstr, endian::little).write_tag(orig_pair.first, *orig_pair.second);
+ io::write_tag(orig_pair.first, *orig_pair.second, sstr, endian::little);
ASSERT(sstr);
//Read from stream in Little Endian and compare
- written_pair = io::stream_reader(sstr, endian::little).read_compound();
+ written_pair = io::read_compound(sstr, endian::little);
ASSERT(orig_pair.first == written_pair.first);
ASSERT(*orig_pair.second == *written_pair.second);