aboutsummaryrefslogtreecommitdiff
path: root/src/tests/clone.cpp
blob: 85333762c3af8d9c43f14b930e9c5c885cabc895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "gats/types.h"

#include <bu/sio.h>

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;
}