From eb71d88041ccbb0aec3532f9b1aa40e956e948c2 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 13 May 2006 01:54:06 +0000 Subject: Changed some things in the serializer...it's cool --- src/test/serialize.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/test/serialize.cpp') diff --git a/src/test/serialize.cpp b/src/test/serialize.cpp index 883be5e..e233704 100644 --- a/src/test/serialize.cpp +++ b/src/test/serialize.cpp @@ -1,24 +1,30 @@ #include "serializerbinary.h" +#include "staticstring.h" #include +#include int main() { int32_t one; double two; bool three; + StaticString s("Test string!"); + std::string ss("Another test string"); SerializerBinary ar("hello.dat", false); ar << (int)85; ar << (double)2.63434; ar << false; + ar << ss; ar.close(); - one = 0; two = 0; three = true; + one = 0; two = 0; three = true; s = "die"; SerializerBinary ar2("hello.dat", true); ar2 >> one; ar2 >> two; ar2 >> three; + ar2 >> s; - printf("we got %d - %f - %s\n", one, two, (three ? "true":"false")); + printf("we got %d - %f - %s - \"%s\"\n", one, two, (three ? "true":"false"), s.getString() ); return 0; } -- cgit v1.2.3