-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgregg_table.unit
153 lines (113 loc) · 32.9 KB
/
gregg_table.unit
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/usr/local/bin/koios
# koios-polos (axis of heaven) unit testing meta-language
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= ========(var)=======
PREP include the prototype headers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
incl include public header gregg.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= ========(var)=======
SCRP (TABLE) verify initializing table 0s init TABLE_init ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
COND verify global bounds - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo ... check real (more than) - - - - - - - - - - - - - g_real i_greater 40
echo ... check real (less than) - - - - - - - - - - - - - g_real i_lesser 60
echo ... check end (more than) - - - - - - - - - - - - - g_end i_greater 50
echo ... check end (less than) - - - - - - - - - - - - - g_end i_lesser 70
echo ... check eof (more than) - - - - - - - - - - - - - g_eof i_greater 400
echo ... check eof (less than) - - - - - - - - - - - - - g_eof i_lesser 700
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.006)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec stop testing PROG__unit_end i_equal 0
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= ========(var)=======
SCRP (TABLE) verify finding letters by name 0s by_name TABLE_letter_by_name, TABLE_letter_by_index ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working/return variable - - - - - - - - - - - - - char t, c, d;
local create working/return variable - - - - - - - - - - - - - float xr, yr, r, b, a;
local create working/return variable - - - - - - - - - - - - - char l [LEN_TERSE];
local create working/return variable - - - - - - - - - - - - - short n;
COND verify quick success (circle) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find TABLE_letter_by_name "a" , LTRS_ALL , &t , &c , l , &xr , &yr , &r , &b , &a , &d i_greater 0 n
COND (1) check letter ¶a¶ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo ... check type - - - - - - - - - - - - - t i_equal SHAPE_CIRCLE
echo ... check category - - - - - - - - - - - - - c i_equal CAT_A
echo ... check label - - - - - - - - - - - - - l w_equal åaæ
echo ... check x radius - - - - - - - - - - - - - xr i_equal 5
echo ... check y radius - - - - - - - - - - - - - yr i_equal 0
echo ... check rotation - - - - - - - - - - - - - r i_equal 90
echo ... check beginning degree - - - - - - - - - - - - - b i_equal 0
echo ... check length/arc - - - - - - - - - - - - - a i_equal 0
echo ... check sample dot spacing - - - - - - - - - - - - - d i_equal 0
COND attempt with missing letter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find TABLE_letter_by_name "ALF" , LTRS_ALL , &t , &c , l , &xr , &yr , &r , &b , &a , &d i_lesser 0
COND (0) check a default result - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo ... check type - - - - - - - - - - - - - t i_equal '-'
echo ... check category - - - - - - - - - - - - - c i_equal CAT_NONE
echo ... check label - - - - - - - - - - - - - l w_equal åæ
echo ... check x radius - - - - - - - - - - - - - xr i_equal 0
echo ... check y radius - - - - - - - - - - - - - yr i_equal 0
echo ... check rotation - - - - - - - - - - - - - r i_equal 0
echo ... check beginning degree - - - - - - - - - - - - - b i_equal 0
echo ... check length/arc - - - - - - - - - - - - - a i_equal 0
echo ... check sample dot spacing - - - - - - - - - - - - - d i_equal 0
COND verify finding letter then data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find TABLE_letter_by_name "a" , LTRS_ALL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL i_greater 0 n
exec call get data TABLE_letter_by_index n , &t , &c , l , &xr , &yr , &r , &b , &a , &d i_equal 0
DITTO (1) check letter ¶a¶ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.008)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify with a line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.005)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find TABLE_letter_by_name "m" , LTRS_ALL , &t , &c , l , &xr , &yr , &r , &b , &a , &d i_greater 0 n
COND (2) check letter ¶m¶ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo ... check type - - - - - - - - - - - - - t i_equal SHAPE_LINE
echo ... check category - - - - - - - - - - - - - c i_equal CAT_M
echo ... check label - - - - - - - - - - - - - l w_equal åmæ
echo ... check x radius - - - - - - - - - - - - - xr i_equal 24
echo ... check y radius - - - - - - - - - - - - - yr i_equal 0
echo ... check rotation - - - - - - - - - - - - - r i_equal 5
echo ... check beginning degree - - - - - - - - - - - - - b i_equal 0
echo ... check length/arc - - - - - - - - - - - - - a i_equal 0
echo ... check sample dot spacing - - - - - - - - - - - - - d i_equal 0
COND attempt with null - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.004)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find TABLE_letter_by_name NULL , LTRS_ALL , &t , &c , l , &xr , &yr , &r , &b , &a , &d i_lesser 0
DITTO (0) check a default result - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.008)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify finding letter then data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find TABLE_letter_by_name "m" , LTRS_ALL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL i_greater 0 n
exec call get data TABLE_letter_by_index n , &t , &c , l , &xr , &yr , &r , &b , &a , &d i_equal 0
DITTO (2) check letter ¶m¶ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.008)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.006)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec stop testing PROG__unit_end i_equal 0
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= ========(var)=======
SCRP (TABLE) verify pulling sizing information on letters 0s sizing TABLE_letter_sizing ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working/return variable - - - - - - - - - - - - - float xe, ye, d, xy;
local create working/return variable - - - - - - - - - - - - - float l, r, t, b;
local create working/return variable - - - - - - - - - - - - - short n, c;
COND verify retieving letter ¶a¶ sizing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find TABLE_letter_by_name "a" , LTRS_ALL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL i_greater 0 n
exec call get data TABLE_letter_sizing n , &xe , &ye , &d , &xy , &l , &r , &t , &b , &c i_equal 0
echo ... check x end - - - - - - - - - - - - - xe i_equal 0
echo ... check y end - - - - - - - - - - - - - ye i_equal 0
echo ... check deg slope - - - - - - - - - - - - - d i_equal 0
echo ... check xy len - - - - - - - - - - - - - xy i_equal 0
echo ... check left - - - - - - - - - - - - - l i_equal -5
echo ... check right - - - - - - - - - - - - - r i_equal 5
echo ... check top - - - - - - - - - - - - - t i_equal 0
echo ... check bot - - - - - - - - - - - - - b i_equal -10
echo ... check point count - - - - - - - - - - - - - c i_greater 300
COND verify retieving letter ¶m¶ sizing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find TABLE_letter_by_name "m" , LTRS_ALL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL i_greater 0 n
exec call get data TABLE_letter_sizing n , &xe , &ye , &d , &xy , &l , &r , &t , &b , &c i_equal 0
echo ... check x end - - - - - - - - - - - - - xe i_equal 23
echo ... check y end - - - - - - - - - - - - - ye i_equal 2
echo ... check deg slope - - - - - - - - - - - - - d i_equal 5
echo ... check xy len - - - - - - - - - - - - - xy i_equal 24
echo ... check left - - - - - - - - - - - - - l i_equal 0
echo ... check right - - - - - - - - - - - - - r i_equal 23
echo ... check top - - - - - - - - - - - - - t i_equal 2
echo ... check bot - - - - - - - - - - - - - b i_equal 0
echo ... check point count - - - - - - - - - - - - - c i_greater 20
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.006)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec stop testing PROG__unit_end i_equal 0
# end-of-file. done, finito, completare, whimper [Ï´···