summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-05-13 02:16:06 +0000
committerMike Buland <eichlan@xagasoft.com>2006-05-13 02:16:06 +0000
commite6fc69187632612974cc650c28fe17d5a6d38e6a (patch)
tree8b813bc3997ec4abc1e45ee00bc055a5fbc87300
parentfef26592adba3689c9c895b17290c9569d920d22 (diff)
downloadlibbu++-e6fc69187632612974cc650c28fe17d5a6d38e6a.tar.gz
libbu++-e6fc69187632612974cc650c28fe17d5a6d38e6a.tar.bz2
libbu++-e6fc69187632612974cc650c28fe17d5a6d38e6a.tar.xz
libbu++-e6fc69187632612974cc650c28fe17d5a6d38e6a.zip
Fixed a bug in the tester.
-rw-r--r--src/test/serializetext.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/test/serializetext.cpp b/src/test/serializetext.cpp
index e7e92d2..f6be7d3 100644
--- a/src/test/serializetext.cpp
+++ b/src/test/serializetext.cpp
@@ -1,24 +1,27 @@
1#include "serializertext.h" 1#include "serializertext.h"
2#include "staticstring.h"
3#include <iostream>
2 4
3int main() 5int main()
4{ 6{
7 StaticString s("You're a dog!!");
5 SerializerText ar("hello.dat", false); 8 SerializerText ar("hello.dat", false);
6 9
7 ar << 4; 10 ar << 4 << 3.993 << true << s;
8 ar << 3.993;
9 ar << true;
10 11
11 ar.close(); 12 ar.close();
12 13
13 int one=0;float two=0.0;bool three=false; 14 int one=0;float two=0.0;bool three=false; s = "";
14 15
15 SerializerText ar2("hello.dat", true); 16 SerializerText ar2("hello.dat", true);
16 17
17 ar2 >> one; 18 ar2 >> one;
18 ar2 >> two; 19 ar2 >> two;
19 ar2 >> three; 20 ar2 >> three;
21 ar2 >> s;
20 22
21 printf("out: %d, %d, %s\n", one, two, three); 23 //printf("out: %d, %f, %s, \"%s\"\n", one, two, (three ? "true" : "false"), s.getString());
24 std::cout << one << ", " << two << ", " << three << ", " << s.getString() << "\n";
22 25
23 return 0; 26 return 0;
24} 27}