From fda6d3bb3149ca8f328263b3716dc2f08c40c5c1 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Mon, 10 Aug 2015 22:27:08 +0200 Subject: Create json_formatter --- test/format_test.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test/format_test.cpp') diff --git a/test/format_test.cpp b/test/format_test.cpp index 7fb7ca45d8..893637c19d 100644 --- a/test/format_test.cpp +++ b/test/format_test.cpp @@ -17,12 +17,24 @@ * You should have received a copy of the GNU Lesser General Public License * along with libnbt++. If not, see . */ +#include "microtest.h" +#include "text/json_formatter.h" +#include "io/stream_reader.h" +#include #include +#include "nbt_tags.h" using namespace nbt; int main() { + std::ifstream file("bigtest_uncompr", std::ios::binary); + ASSERT(file); + std::string key; + std::unique_ptr comp; + std::tie(key, comp) = io::stream_reader(file).read_compound(); + std::cout << "----- json_formatter:\n"; + text::json_formatter().write(std::cout, *comp); + std::cout << "\n-----" << std::endl; } - -- cgit 0.0.5-2-1-g0f52