aboutsummaryrefslogtreecommitdiff
path: root/c++-libbu++/src/tests/clone.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-09 17:20:11 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-09 17:20:11 +0000
commitd534a56d95bca7bdd812be024d9eacba4734e2b7 (patch)
treef9b98ee2b80e645a7b54e7934882be6c9f73c165 /c++-libbu++/src/tests/clone.cpp
parent61ccc86fdf06f12cb72a8b7e65286f812cf62154 (diff)
downloadlibgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.gz
libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.bz2
libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.tar.xz
libgats-d534a56d95bca7bdd812be024d9eacba4734e2b7.zip
Many changes: tabconv'd the C++ code, added a license, BSD, and docs.
Diffstat (limited to '')
-rw-r--r--c++-libbu++/src/tests/clone.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/c++-libbu++/src/tests/clone.cpp b/c++-libbu++/src/tests/clone.cpp
index 8533376..bfb7b27 100644
--- a/c++-libbu++/src/tests/clone.cpp
+++ b/c++-libbu++/src/tests/clone.cpp
@@ -1,3 +1,10 @@
1/*
2 * Copyright (C) 2007-2012 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libgats library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
1#include "gats/types.h" 8#include "gats/types.h"
2 9
3#include <bu/sio.h> 10#include <bu/sio.h>
@@ -6,17 +13,17 @@ using namespace Bu;
6 13
7int main( int argc, char *argv[] ) 14int main( int argc, char *argv[] )
8{ 15{
9 Gats::Object *pBase = Gats::Object::strToGats("{\"Thing\": 3.14159, \"bool\": true, \"list\":[\"string\",44,{\"Stuff\":{\"list\":[],\"what?\":false}}]}"); 16 Gats::Object *pBase = Gats::Object::strToGats("{\"Thing\": 3.14159, \"bool\": true, \"list\":[\"string\",44,{\"Stuff\":{\"list\":[],\"what?\":false}}]}");
10 17
11 sio << *pBase << sio.nl; 18 sio << *pBase << sio.nl;
12 19
13 Gats::Object *pNew = pBase->clone(); 20 Gats::Object *pNew = pBase->clone();
14 delete pBase; 21 delete pBase;
15 22
16 sio << *pNew << sio.nl; 23 sio << *pNew << sio.nl;
17 24
18 delete pNew; 25 delete pNew;
19 26
20 return 0; 27 return 0;
21} 28}
22 29