aboutsummaryrefslogtreecommitdiff
path: root/src/test/serializetext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/serializetext.cpp')
-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}