summaryrefslogtreecommitdiff
path: root/test/format_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/format_test.cpp')
-rw-r--r--test/format_test.cpp14
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;
}
-