summaryrefslogtreecommitdiff
path: root/src/tests/serializetext.cpp
blob: f6be7d33ae0acb016a9913a23a26f8c3fe59aed9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "serializertext.h"
#include "staticstring.h"
#include <iostream>

int main()
{
	StaticString s("You're a dog!!");
	SerializerText ar("hello.dat", false);

	ar << 4 << 3.993 << true << s;

	ar.close();

	int one=0;float two=0.0;bool three=false; s = "";

	SerializerText ar2("hello.dat", true);
	
	ar2 >> one;
	ar2 >> two;
	ar2 >> three;
	ar2 >> s;
	
	//printf("out: %d, %f, %s, \"%s\"\n", one, two, (three ? "true" : "false"), s.getString());
	std::cout << one << ", " << two << ", " << three << ", " << s.getString() << "\n";
	
	return 0;
}