aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tests/json.cpp22
1 files changed, 22 insertions, 0 deletions
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 @@
1#include <bu/json.h>
2#include <bu/file.h>
3#include <bu/sio.h>
4#include <bu/streamstack.h>
5
6int main( int argc, char *argv[] )
7{
8 Bu::File fIn( "test1.json", Bu::File::Read );
9 Bu::Json ob( fIn );
10 ob.write( Bu::sioRaw );
11 Bu::println("\n");
12 Bu::String back1 = ob.toStringStable();
13 Bu::Json ob2( back1 );
14 Bu::String back2 = ob2.toStringStable();
15 Bu::println( back1 );
16 Bu::println( back2 );
17 if( back1 == back2 )
18 Bu::println("loop success");
19 else
20 Bu::println("loop failure");
21}
22