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. --- .gitignore | 4 ++++ src/tests/json.cpp | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/tests/json.cpp diff --git a/.gitignore b/.gitignore index 72ce842..7acde28 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,12 @@ /myriad /viewcsv .*.swp +.*.un~ /src/autoconfig.h /src/signals.h /src/version.h /bu /.build_cache +/unit +/tests +/src/unit/*.cpp 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