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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#include "SvoValue.h"

GUI_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);

// temporary
Value ist = Opt0();
if(ist.Is<int>())
RLOG("int");
if(IsNumber(ist))
RLOG("number");
//


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

CheckType(Value());
CheckType(String("ahoj"), true);
CheckType(String('a', 20), true);
CheckType(String('b', 200), true);
CheckType(WString("ahoj"));
CheckType(123);
CheckType(123.0);
CheckType(true);
CheckType((int64)123, true);
CheckType(Date(2012, 1, 1));
CheckType(Time(2012, 1, 1, 15, 30), true);
CheckType(Complex(1, 2), true);
ValueArray va;
va.Add(123);
va.Add("ahoj");
ASSERT(va.GetCount() == 2);
ASSERT(va[0] == 123);
ASSERT(va[1] == "ahoj");
CheckType(va, true);
ValueMap map;
map.Add("1", 1);
map.Add("2", 2);
CheckType(map, true);
CheckType(Point(20, 20), true);
CheckType(Size(20, 20), true);
CheckType(Rect(0, 0, 123, 123), true);
CheckType(Point64(20, 20), true);
CheckType(Size64(20, 20), true);
CheckType(Rect64(0, 0, 123, 123), true);
CheckType(Pointf(20, 20), true);
CheckType(Sizef(20, 20), true);
CheckType(Rectf(0, 0, 123, 123), true);
CheckType(Blue(), true);
Uuid uuid;
uuid.a = 11234;
uuid.b = 321;
uuid.c = 1111;
uuid.d = 19999;
CheckType(uuid, true);

CheckType(Arial(50).Bold().Strikeout(), true);

{
DrawingDraw g(100, 100);
g.DrawText(0, 0, "Hello world");
Drawing x = g.GetResult();
CheckType(x);
}

{
PaintingPainter g(100, 100);
g.DrawText(0, 0, "Hello world");
Painting x = g.GetResult();
CheckType(x);
}

CheckType(CtrlImg::save());

v = ErrorValue("error");
CheckType(v, true);
ASSERT(v.IsVoid());
ASSERT(v.IsError());
ASSERT(!Value().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("CheckValue");
CheckRawValue();

RLOG("------------------------------");
RLOG("CheckRawValue");
CheckRawValue();

RLOG("------------------------------");
RLOG("CheckRawPickValue");
CheckRawPickValue();

RLOG("------------------------------");
RLOG("CheckCreateRawValue");
CheckCreateRawValue();

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

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

PromptOK("OK");
}

Change log

r4949 by cxl on May 14, 2012   Diff
.upptst: SvoValue now tests Font,
Painting, Drawing, Image
Go to: 
Project members, sign in to write a code review

Older revisions

r4916 by cxl on May 9, 2012   Diff
.upptst: GuiJsonize
r4732 by cxl on Mar 31, 2012   Diff
upptst: Gzip for Zlib testing
r4680 by cxl on Mar 11, 2012   Diff
.upptst: Added Null testing to
ScoValue
All revisions of this file

File info

Size: 2662 bytes, 124 lines
Powered by Google Project Hosting