summaryrefslogtreecommitdiff
path: root/src/tests/variant.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-03-30 22:33:41 +0000
committerMike Buland <eichlan@xagasoft.com>2011-03-30 22:33:41 +0000
commit4b9289cfb260f4bcecaf23a810584ef6ef8e8501 (patch)
tree79136af08c7e42ba3322f0d73e9779e4354b318a /src/tests/variant.cpp
parentc7636dc954eddfe58f7959392602fbc9072d77e7 (diff)
downloadlibbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.gz
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.bz2
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.tar.xz
libbu++-4b9289cfb260f4bcecaf23a810584ef6ef8e8501.zip
Ok, string stuff is working much, much better, a load of new unit tests have
been added, and I deleted a whole slew of stupid old tests that I don't need.
Diffstat (limited to '')
-rw-r--r--src/tests/variant.cpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/tests/variant.cpp b/src/tests/variant.cpp
deleted file mode 100644
index 68dec4f..0000000
--- a/src/tests/variant.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#include <bu/sio.h>
9#include <bu/variant.h>
10#include <bu/list.h>
11
12using namespace Bu;
13
14Variant getThing( int i )
15{
16 Variant v;
17 switch( i )
18 {
19 case 0:
20 v = 45;
21 break;
22
23 case 1:
24 v = true;
25 break;
26
27 case 2:
28 v = List<int>(5).append(10).append(15);
29 break;
30 }
31
32 return v;
33}
34
35int main()
36{
37 Variant a;
38 Variant b;
39 Variant c;
40
41 a = getThing( 0 );
42 b = getThing( 1 );
43 c = getThing( 2 );
44
45 sio << "a = " << a << " or " << (int)a << sio.nl
46 << "b = " << b << " or " << b.toString() << sio.nl
47 << "c = " << c << " or " << c.toString() << sio.nl
48 << sio.nl;
49
50 return 0;
51}
52