From 74dd68ad611d15abf16a65c36a7cfd3f4492930a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 9 Nov 2012 16:25:22 +0000 Subject: Made the repo less libbu++-centric. --- c++-libbu++/src/tests/clone.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 c++-libbu++/src/tests/clone.cpp (limited to 'c++-libbu++/src/tests/clone.cpp') diff --git a/c++-libbu++/src/tests/clone.cpp b/c++-libbu++/src/tests/clone.cpp new file mode 100644 index 0000000..8533376 --- /dev/null +++ b/c++-libbu++/src/tests/clone.cpp @@ -0,0 +1,22 @@ +#include "gats/types.h" + +#include + +using namespace Bu; + +int main( int argc, char *argv[] ) +{ + Gats::Object *pBase = Gats::Object::strToGats("{\"Thing\": 3.14159, \"bool\": true, \"list\":[\"string\",44,{\"Stuff\":{\"list\":[],\"what?\":false}}]}"); + + sio << *pBase << sio.nl; + + Gats::Object *pNew = pBase->clone(); + delete pBase; + + sio << *pNew << sio.nl; + + delete pNew; + + return 0; +} + -- cgit v1.2.3