diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-03-30 22:33:41 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-03-30 22:33:41 +0000 |
commit | 4b9289cfb260f4bcecaf23a810584ef6ef8e8501 (patch) | |
tree | 79136af08c7e42ba3322f0d73e9779e4354b318a /src/tests/fstratsptr.cpp | |
parent | c7636dc954eddfe58f7959392602fbc9072d77e7 (diff) | |
download | libbu++-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/fstratsptr.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/tests/fstratsptr.cpp b/src/tests/fstratsptr.cpp deleted file mode 100644 index 5053dd1..0000000 --- a/src/tests/fstratsptr.cpp +++ /dev/null | |||
@@ -1,53 +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/string.h" | ||
9 | #include "bu/atom.h" | ||
10 | #include "bu/sptr.h" | ||
11 | |||
12 | class Person | ||
13 | { | ||
14 | public: | ||
15 | Person(){}; | ||
16 | virtual ~Person(){}; | ||
17 | |||
18 | Bu::Atom<Bu::String> sFirstName; | ||
19 | Bu::Atom<Bu::String> sLastName; | ||
20 | }; | ||
21 | |||
22 | typedef Bu::SPtr<Person> PersonPtr; | ||
23 | |||
24 | void Swap(PersonPtr one, PersonPtr two) | ||
25 | { | ||
26 | PersonPtr three(new Person); | ||
27 | three->sFirstName = one->sFirstName; | ||
28 | three->sLastName = two->sLastName; | ||
29 | |||
30 | printf( | ||
31 | "%s %s\n", | ||
32 | three->sFirstName->getStr(), | ||
33 | three->sLastName->getStr() ); | ||
34 | } | ||
35 | |||
36 | int main() | ||
37 | { | ||
38 | /* PersonPtr one(new Person); | ||
39 | PersonPtr two(new Person); | ||
40 | one->sFirstName = "Bob"; | ||
41 | one->sLastName = "Smith"; | ||
42 | two->sFirstName = "Fred"; | ||
43 | two->sLastName = "Carpenter"; | ||
44 | |||
45 | Swap(one, two); | ||
46 | */ | ||
47 | |||
48 | Bu::Atom<Bu::String> sOne, sTwo; | ||
49 | sOne = "Hello"; | ||
50 | sTwo = sOne; | ||
51 | |||
52 | return 0; | ||
53 | } | ||