My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include "SvoValue.h"

CONSOLE_APP_MAIN
{
Value v;
ASSERT(v.IsVoid());

CheckType(Value(), true);
CheckType(String("ahoj"), false, true);
CheckType(WString("ahoj"));
CheckType(123);
CheckType(123.0, false, true);
CheckType(true);
CheckType((int64)123);
CheckType(Date(2012, 1, 1));
CheckType(Time(2012, 1, 1, 15, 30), false, true);
ValueArray va;
va.Add(123);
CheckType(va, false, true);
ValueMap map;
map.Add("1", 1);
map.Add("2", 2);
CheckType(map, false, true);
CheckType(Size(20, 20), false, true);
CheckType(Rect(0, 0, 123, 123), false, true);
CheckType(Blue(), false, true);
CheckType(Uuid::Create(), false, true);

v = ErrorValue("error");
CheckType(v, true);
ASSERT(v.IsVoid());
ASSERT(v.IsError());
RDUMP(GetErrorText(v));
ASSERT(GetErrorText(v) == "error");

CheckValueMap();

CheckNumber<int>();
CheckNumber<double>();
CheckNumber<int64>();
CheckNumber<bool>();

RLOG("------------------------------");
RLOG("CheckString");
CheckString();

RLOG("------------------------------");
RLOG("CheckDateTime");
CheckDateTime();

RLOG("------------------------------");
RLOG("OtherChecks");
OtherChecks();

RLOG("------------------------------");
RLOG("######## Everything is OK");
}

Change log

r4370 by cxl on Jan 8, 2012   Diff
.developing svo_value
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1232 bytes, 57 lines
Powered by Google Project Hosting