diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-08-10 22:27:08 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-08-10 22:27:08 +0200 |
| commit | fda6d3bb3149ca8f328263b3716dc2f08c40c5c1 (patch) | |
| tree | 54acace967eec9b167556e830cd470e375dbdc20 /test | |
| parent | c72357d6b73c80ede8ffbcc2bdab6f3c6d3115e0 (diff) | |
| download | Project-Tick-fda6d3bb3149ca8f328263b3716dc2f08c40c5c1.tar.gz Project-Tick-fda6d3bb3149ca8f328263b3716dc2f08c40c5c1.zip | |
Create json_formatter
Diffstat (limited to 'test')
| -rw-r--r-- | test/format_test.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. */ +#include "microtest.h" +#include "text/json_formatter.h" +#include "io/stream_reader.h" +#include <fstream> #include <iostream> +#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<tag_compound> 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; } - |
