aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/clone.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/clone.cpp b/src/tests/clone.cpp
new file mode 100644
index 0000000..8533376
--- /dev/null
+++ b/src/tests/clone.cpp
@@ -0,0 +1,22 @@
1#include "gats/types.h"
2
3#include <bu/sio.h>
4
5using namespace Bu;
6
7int main( int argc, char *argv[] )
8{
9 Gats::Object *pBase = Gats::Object::strToGats("{\"Thing\": 3.14159, \"bool\": true, \"list\":[\"string\",44,{\"Stuff\":{\"list\":[],\"what?\":false}}]}");
10
11 sio << *pBase << sio.nl;
12
13 Gats::Object *pNew = pBase->clone();
14 delete pBase;
15
16 sio << *pNew << sio.nl;
17
18 delete pNew;
19
20 return 0;
21}
22