From e98644cd777ddd4ae769da2d8bdcbc6fa8bbb30a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 6 Jun 2017 23:57:26 -0700 Subject: Updated .gitignore, included terrible json test. --- src/tests/json.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/tests/json.cpp (limited to 'src') diff --git a/src/tests/json.cpp b/src/tests/json.cpp new file mode 100644 index 0000000..7c1c119 --- /dev/null +++ b/src/tests/json.cpp @@ -0,0 +1,22 @@ +#include +#include +#include +#include + +int main( int argc, char *argv[] ) +{ + Bu::File fIn( "test1.json", Bu::File::Read ); + Bu::Json ob( fIn ); + ob.write( Bu::sioRaw ); + Bu::println("\n"); + Bu::String back1 = ob.toStringStable(); + Bu::Json ob2( back1 ); + Bu::String back2 = ob2.toStringStable(); + Bu::println( back1 ); + Bu::println( back2 ); + if( back1 == back2 ) + Bu::println("loop success"); + else + Bu::println("loop failure"); +} + -- cgit v1.2.3