-
Notifications
You must be signed in to change notification settings - Fork 0
/
gregg_base.unit
499 lines (388 loc) · 114 KB
/
gregg_base.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
#!/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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
incl include private header gregg_priv.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 (BASE) verify allocating and freeing bases 0s memory BASE__new, BASE__force, BASE__free ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working/return variables - - - - - - - - - - - - - tBASE *x_base = NULL;
local create working/return variables - - - - - - - - - - - - - tBASE *x_save = NULL;
COND attempt to free a non-existant object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE__free &x_base i_lesser 0
echo ... check pointer - - - - - - - - - - - - - x_base p_null 0
COND verify creating an object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call new BASE__new &x_base i_equal 1
echo ... check pointer - - - - - - - - - - - - - x_base p_exists 0
COND (0) verify object is wiped - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.004)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo ... check english - - - - - - - - - - - - - x_base->b_english w_equal åæ
echo ... check gregg - - - - - - - - - - - - - x_base->b_gregg w_equal åæ
echo ... check shown - - - - - - - - - - - - - x_base->b_shown w_equal åæ
echo ... check drawn - - - - - - - - - - - - - x_base->b_drawn [0] i_equal 0
echo ... check tree - - - - - - - - - - - - - x_base->b_tree [0] i_equal 0
echo ... check file - - - - - - - - - - - - - x_base->b_file i_equal -1
echo ... check line - - - - - - - - - - - - - x_base->b_line i_equal -1
echo ... check head - - - - - - - - - - - - - x_base->b_head p_null 0
echo ... check tail - - - - - - - - - - - - - x_base->b_tail p_null 0
echo ... check nvary - - - - - - - - - - - - - x_base->b_ndict i_equal 0
echo ... check part - - - - - - - - - - - - - x_base->b_part i_equal '·'
echo ... check sub - - - - - - - - - - - - - x_base->b_sub i_equal '·'
echo ... check src - - - - - - - - - - - - - x_base->b_src i_equal '·'
echo ... check cat - - - - - - - - - - - - - x_base->b_cat i_equal '·'
echo ... check page - - - - - - - - - - - - - x_base->b_page i_equal 0
echo ... check grp - - - - - - - - - - - - - x_base->b_grp i_equal '·'
echo ... check freq - - - - - - - - - - - - - x_base->b_freq i_equal 0
echo ... check btree - - - - - - - - - - - - - x_base->b_ysort p_null 0
COND change the contents - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.005)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code ... change english - - - - - - - - - - - - - strcpy (x_base->b_english, "english");
code ... change gregg - - - - - - - - - - - - - strcpy (x_base->b_gregg , "e·n·sh");
code ... change shown - - - - - - - - - - - - - strcpy (x_base->b_shown , "exn·n·sh");
code ... change drawn - - - - - - - - - - - - - x_base->b_drawn [0] = 34;
code ... change tree - - - - - - - - - - - - - x_base->b_tree [0] = 12;
code ... change file - - - - - - - - - - - - - x_base->b_file = 3;
code ... change line - - - - - - - - - - - - - x_base->b_line = 342;
code ... change head - - - - - - - - - - - - - x_base->b_head = 0xF;
code ... change head - - - - - - - - - - - - - x_base->b_tail = 0x9;
code ... change nvary - - - - - - - - - - - - - x_base->b_ndict = 5;
code ... change part - - - - - - - - - - - - - x_base->b_part = 'v';
code ... change sub - - - - - - - - - - - - - x_base->b_sub = 'n';
code ... change src - - - - - - - - - - - - - x_base->b_src = '5';
code ... change cat - - - - - - - - - - - - - x_base->b_cat = '°';
code ... change page - - - - - - - - - - - - - x_base->b_page = 972;
code ... change group - - - - - - - - - - - - - x_base->b_grp = '!';
code ... change freq - - - - - - - - - - - - - x_base->b_freq = 632;
code ... change bsort - - - - - - - - - - - - - x_base->b_ysort = 0xA;
COND verify wiping the object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.006)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call wipe BASE__wipe x_base i_equal 1
DITTO (0) [ verify object is wiped ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.007)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND attempt to create with a used-pointer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.008)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code ... save previous instance - - - - - - - - - - - - - x_save = x_base;
exec call new BASE__new &x_base i_lesser 0
echo ... check pointer does not change - - - - - - - - - - - - - x_base p_equal [[ x_save ]]
COND verify freeing the pointer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.009)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE__free &x_base i_equal 0
echo ... check pointer - - - - - - - - - - - - - x_base p_null 0
COND attempt to free a grounded pointer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.010)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE__free &x_base i_lesser 0
echo ... check pointer - - - - - - - - - - - - - x_base p_null 0
COND verify creating another object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.011)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call new BASE__new &x_base i_equal 1
echo ... check pointer - - - - - - - - - - - - - x_base p_exists 0
DITTO (0) [ verify object is wiped ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.012)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify forcing the creation reusing the ponter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.013)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code ... save previous instance - - - - - - - - - - - - - x_save = x_base;
exec call new BASE__force &x_base i_equal 1
echo ... check pointer - - - - - - - - - - - - - x_base p_exists 0
echo ... check pointer did change - - - - - - - - - - - - - x_base p_not [[ x_save ]]
DITTO (0) [ verify object is wiped ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.014)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify freeing the first - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.015)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE__free &x_save i_equal 0
echo ... check pointer - - - - - - - - - - - - - x_save p_null 0
COND verify freeing the second - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.016)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE__free &x_base i_equal 0
echo ... check pointer - - - - - - - - - - - - - x_base p_null 0
COND attempt to create with null return pointer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.017)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call new BASE__new NULL i_lesser 0
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.018)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 (BASE) verify populating data 0s populate BASE__populate ((02.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((02.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working/return variables - - - - - - - - - - - - - tBASE *x_base = NULL;
COND create a sample - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((02.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call new BASE__new &x_base i_equal 1
COND verify a simple success - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((02.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call populate BASE__populate x_base , 1 , 21 , "and" , "nd" i_equal 0
echo ... check file - - - - - - - - - - - - - x_base->b_file i_equal 1
echo ... check line - - - - - - - - - - - - - x_base->b_line i_equal 21
echo ... check english - - - - - - - - - - - - - x_base->b_english w_equal åandæ
echo ... check gregg - - - - - - - - - - - - - x_base->b_gregg w_equal åndæ
COND free the sample - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((02.004)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE__free &x_base i_equal 0
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((02.005)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 (BASE) verify hooking and unhooking 0s hooking BASE__hook, BASE__unhook ((03.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working/return variables - - - - - - - - - - - - - tBASE *x_1st = NULL;
local create working/return variables - - - - - - - - - - - - - tBASE *x_2nd = NULL;
REUSE -A- [ add a standard letter table ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REUSE -B- [ verify letter load ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND create a small sample - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.004)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call new BASE__new &x_1st i_equal 1
exec call new BASE__new &x_2nd i_equal 1
COND (0) verify blank state - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.005)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 0
get ... check entry BASE__entry 0 s_equal n/a
get ... check entry BASE__entry 1 s_equal n/a
get ... check entry BASE__entry 2 s_equal n/a
COND verify hooking one - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.006)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call populate BASE__populate x_1st , 2 , 13 , "the" , "th" i_equal 0
exec call hook BASE__hook x_1st i_equal 0
get ... check count BASE__count i_equal 1
get ... check entry BASE__entry 0 s_equal 0 3åtheæ 2/ 13 0 · · · · 0 · 0 2åthæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal n/a
get ... check entry BASE__entry 2 s_equal n/a
COND verify unhooking only - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.007)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call unhook BASE__unhook x_1st i_equal 0
DITTO (0) [ verify blank state ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.008)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify re-hooking one - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.009)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call hook BASE__hook x_1st i_equal 0
get ... check count BASE__count i_equal 1
get ... check entry BASE__entry 0 s_equal 0 3åtheæ 2/ 13 0 · · · · 0 · 0 2åthæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal n/a
get ... check entry BASE__entry 2 s_equal n/a
COND verify hooking two (sort by tree, not english) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.010)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call populate BASE__populate x_2nd , 4 , 590 , "and" , "nd" i_equal 0
exec call hook BASE__hook x_2nd i_equal 0
get ... check count BASE__count i_equal 2
get ... check entry BASE__entry 0 s_equal 0 3åtheæ 2/ 13 0 · · · · 0 · 0 2åthæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal 1 3åandæ 4/590 0 · · · · 0 · 0 2åndæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 2 s_equal n/a
COND verify unhooking first added - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.011)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call unhook BASE__unhook x_1st i_equal 0
get ... check count BASE__count i_equal 1
get ... check entry BASE__entry 0 s_equal 0 3åandæ 4/590 0 · · · · 0 · 0 2åndæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal n/a
get ... check entry BASE__entry 2 s_equal n/a
COND verify unhooking last - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.012)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call unhook BASE__unhook x_2nd i_equal 0
DITTO (0) [ verify blank state ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.013)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND free the small sample - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.014)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE__free &x_1st i_equal 0
exec call free BASE__free &x_2nd i_equal 0
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.015)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 (BASE) verify creating words (sorted by tree order) 0s create BASE_create ((04.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working/return variable - - - - - - - - - - - - - tBASE *x_head = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_next = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_prev = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_tail = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_plus = NULL;
REUSE -A- [ add a standard letter table ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REUSE -B- [ verify letter load ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify blank state - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.004)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 0
get ... check entry BASE__entry 0 s_equal n/a
get ... check entry BASE__entry 1 s_equal n/a
get ... check entry BASE__entry 2 s_equal n/a
get ... check entry BASE__entry 3 s_equal n/a
get ... check entry BASE__entry 4 s_equal n/a
get ... check entry BASE__entry 5 s_equal n/a
COND verify adding base data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.005)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call create BASE_create 2 , 15 , "head" , "h·e·d" , "v · 9 d 124 · ·" , &x_head i_equal 0
COND (0) verify current dictionary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.006)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 1
get ... check entry BASE__entry 0 s_equal 0 4åheadæ 2/ 15 0 v · 9 d 124 · 0 5åh·e·dæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal n/a
get ... check entry BASE__entry 2 s_equal n/a
get ... check entry BASE__entry 3 s_equal n/a
get ... check entry BASE__entry 4 s_equal n/a
get ... check entry BASE__entry 5 s_equal n/a
COND attempt with critical nulls - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.007)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call create BASE_create 5 , 143 , NULL , "p·r·e·v" , "n v 4 ° 15 b 1234", &x_prev i_lesser 0
exec call create BASE_create 5 , 143 , "prev" , NULL , "n v 4 ° 15 b 1234", &x_prev i_lesser 0
DITTO (0) [ verify current dictionary ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.008)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify adding another - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.009)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call create BASE_create 5 , 143 , "prev" , "p·r·e·v" , "n v 4 ° 15 b 1234", &x_prev i_equal 0
COND verify current dictionary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.010)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 2
get ... check entry BASE__entry 0 s_equal 0 4åprevæ 5/143 0 n v 4 ° 15 b 1234 7åp·r·e·væ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal 1 4åheadæ 2/ 15 0 v · 9 d 124 · 0 5åh·e·dæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 2 s_equal n/a
get ... check entry BASE__entry 3 s_equal n/a
get ... check entry BASE__entry 4 s_equal n/a
get ... check entry BASE__entry 5 s_equal n/a
COND verify adding another - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.011)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call create BASE_create 20 , 695 , "tail" , "t·a·l" , "· · · · · · ·" , &x_tail i_equal 0
COND verify current dictionary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.012)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 3
get ... check entry BASE__entry 0 s_equal 0 4åtailæ 20/695 0 · · · · 0 · 0 5åt·a·læ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal 1 4åprevæ 5/143 0 n v 4 ° 15 b 1234 7åp·r·e·væ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 2 s_equal 2 4åheadæ 2/ 15 0 v · 9 d 124 · 0 5åh·e·dæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 3 s_equal n/a
get ... check entry BASE__entry 4 s_equal n/a
get ... check entry BASE__entry 5 s_equal n/a
COND verify adding another - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.013)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call create BASE_create 42 , 23 , "next" , "n·e·xz·t" , "" , &x_next i_equal 0
COND verify current dictionary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.014)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 4
get ... check entry BASE__entry 0 s_equal 0 4åtailæ 20/695 0 · · · · 0 · 0 5åt·a·læ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal 1 4ånextæ 42/ 23 0 · · · · 0 · 0 8ån·e·xz·tæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 2 s_equal 2 4åprevæ 5/143 0 n v 4 ° 15 b 1234 7åp·r·e·væ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 3 s_equal 3 4åheadæ 2/ 15 0 v · 9 d 124 · 0 5åh·e·dæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 4 s_equal n/a
get ... check entry BASE__entry 5 s_equal n/a
COND verify adding another - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.015)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call create BASE_create 0 , 1 , "and" , "nd" , NULL , &x_plus i_equal 0
COND verify current dictionary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.016)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 5
get ... check entry BASE__entry 0 s_equal 0 4åtailæ 20/695 0 · · · · 0 · 0 5åt·a·læ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal 1 3åandæ 0/ 1 0 · · · · 0 · 0 2åndæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 2 s_equal 2 4ånextæ 42/ 23 0 · · · · 0 · 0 8ån·e·xz·tæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 3 s_equal 3 4åprevæ 5/143 0 n v 4 ° 15 b 1234 7åp·r·e·væ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 4 s_equal 4 4åheadæ 2/ 15 0 v · 9 d 124 · 0 5åh·e·dæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 5 s_equal n/a
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((04.017)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 (BASE) verify searching base words 0s find BASE__by_index, BASE__by_cursor ((05.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working/return variable - - - - - - - - - - - - - tBASE *x_head = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_next = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_prev = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_tail = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_curr = NULL;
local create working/return variable - - - - - - - - - - - - - char x_cats [LEN_LABEL] = "";
REUSE -A- [ add a standard letter table ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REUSE -B- [ verify letter load ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify blank state - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.004)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 0
get ... check entry BASE__entry 0 s_equal n/a
get ... check entry BASE__entry 1 s_equal n/a
get ... check entry BASE__entry 2 s_equal n/a
get ... check entry BASE__entry 3 s_equal n/a
get ... check entry BASE__entry 4 s_equal n/a
COND verify searches with zero data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.005)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find BASE__by_index 0 , &x_curr i_lesser 0
echo ... check return - - - - - - - - - - - - - x_curr p_null 0
exec call find BASE__by_cursor YDLST_HEAD , &x_curr i_lesser 0
echo ... check return - - - - - - - - - - - - - x_curr p_null 0
COND verify adding base data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.006)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call create BASE_create 2 , 15 , "tail" , "t·a·l" , "· · · · · · ·" , &x_tail i_equal 0
exec call create BASE_create 2 , 15 , "next" , "n·e·xz·t" , "· · · · · · ·" , &x_next i_equal 0
exec call create BASE_create 2 , 15 , "head" , "h·e·d" , "· · · · · · ·" , &x_head i_equal 0
exec call create BASE_create 2 , 15 , "prev" , "p·r·e·v" , "· · · · · · ·" , &x_prev i_equal 0
COND verify current dictionary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.007)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 4
get ... check entry BASE__entry 0 s_equal 0 4åtailæ 2/ 15 0 · · · · 0 · 0 5åt·a·læ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal 1 4ånextæ 2/ 15 0 · · · · 0 · 0 8ån·e·xz·tæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 2 s_equal 2 4åprevæ 2/ 15 0 · · · · 0 · 0 7åp·r·e·væ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 3 s_equal 3 4åheadæ 2/ 15 0 · · · · 0 · 0 5åh·e·dæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 4 s_equal n/a
COND verify by index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.008)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find BASE__by_index -1 , &x_curr i_lesser 0
echo ... check return - - - - - - - - - - - - - x_curr p_null 0
exec call find BASE__by_index 0 , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal tail
exec call find BASE__by_index 1 , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal next
exec call find BASE__by_index 2 , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal prev
exec call find BASE__by_index 3 , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal head
exec call find BASE__by_index 4 , &x_curr i_lesser 0
echo ... check return - - - - - - - - - - - - - x_curr p_null 0
COND verify by cursor forward - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.009)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find BASE__by_cursor YDLST_HEAD , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal tail
exec call find (BOOM) BASE__by_cursor YDLST_PREV , &x_curr i_lesser 0
echo ... check return - - - - - - - - - - - - - x_curr p_null 0
exec call find BASE__by_cursor YDLST_NEXT , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal next
exec call find BASE__by_cursor YDLST_NEXT , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal prev
COND verify by cursor backward - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.010)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find BASE__by_cursor YDLST_TAIL , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal head
exec call find (BOOM) BASE__by_cursor YDLST_NEXT , &x_curr i_lesser 0
echo ... check return - - - - - - - - - - - - - x_curr p_null 0
exec call find BASE__by_cursor YDLST_PREV , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal prev
exec call find BASE__by_cursor YDLST_PREV , &x_curr i_equal 0
echo ... check return - - - - - - - - - - - - - x_curr->b_english s_equal next
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((05.011)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 (BASE) verify writing and reading a database 0s database BASE_write, BASE_read ((06.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working/return variable - - - - - - - - - - - - - char x_name [LEN_HUND] = "/tmp/base.db";
local create working/return variable - - - - - - - - - - - - - FILE *x_db = NULL;
local create working/return variable - - - - - - - - - - - - - short x_count = 0;
local create working/return variable - - - - - - - - - - - - - tBASE *x_head = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_next = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_prev = NULL;
local create working/return variable - - - - - - - - - - - - - tBASE *x_tail = NULL;
exec remove test file yURG_rm x_name i_equal 0
REUSE -A- [ add a standard letter table ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REUSE -B- [ verify letter load ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND (0) verify blank state - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.004)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 0
get ... check entry BASE__entry 0 s_equal n/a
get ... check entry BASE__entry 1 s_equal n/a
get ... check entry BASE__entry 2 s_equal n/a
COND verify adding base data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.005)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call create BASE_create 2 , 15 , "tail" , "t·a·l" , "· · · · · · ·" , &x_tail i_equal 0
exec call create BASE_create 2 , 15 , "next" , "n·e·xz·t" , "· · · · · · ·" , &x_next i_equal 0
exec call create BASE_create 2 , 15 , "head" , "h·e·d" , "· · · · · · ·" , &x_head i_equal 0
exec call create BASE_create 2 , 15 , "prev" , "p·r·e·v" , "· · · · · · ·" , &x_prev i_equal 0
COND (1) verify current dictionary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.006)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get ... check count BASE__count i_equal 4
get ... check entry BASE__entry 0 s_equal 0 4åtailæ 2/ 15 0 · · · · 0 · 0 5åt·a·læ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 1 s_equal 1 4ånextæ 2/ 15 0 · · · · 0 · 0 8ån·e·xz·tæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 2 s_equal 2 4åprevæ 2/ 15 0 · · · · 0 · 0 7åp·r·e·væ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 3 s_equal 3 4åheadæ 2/ 15 0 · · · · 0 · 0 5åh·e·dæ ¬¬¬¬¬¬¬
get ... check entry BASE__entry 4 s_equal n/a
COND save the count - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.007)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code ... save count - - - - - - - - - - - - - x_count = BASE__count ();
echo ... check count - - - - - - - - - - - - - x_count i_equal 4
COND verify allocating the root index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.008)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call allocate BASE_index_new x_count i_equal 0
COND verify writing the database - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.009)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call open SHARED_open x_name , 'W' , &x_db i_equal 0
exec call write BASE_write x_db i_equal 0
exec call close SHARED_close &x_db i_equal 0
COND (2) verify indexes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.010)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec ... check index BASE_index_get 0 p_equal [[ x_tail ]]
exec ... check index BASE_index_get 1 p_equal [[ x_next ]]
exec ... check index BASE_index_get 2 p_equal [[ x_prev ]]
exec ... check index BASE_index_get 3 p_equal [[ x_head ]]
exec ... check index BASE_index_get 4 p_equal NULL
COND verify freeing root index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.011)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE_index_free i_equal 0
exec ... check index BASE_index_get 0 p_equal NULL
COND purge all entries - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.012)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call purge BASE__purge i_equal 0
DITTO (0) [ verify blank state ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.013)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND ground pointers and search - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.014)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code ... ground pointers - - - - - - - - - - - - - x_tail = x_next = x_prev = x_head = NULL;
exec call find BASE__by_cursor YDLST_HEAD , &x_tail i_lesser 0
exec call find BASE__by_cursor YDLST_NEXT , &x_next i_lesser 0
exec call find BASE__by_cursor YDLST_NEXT , &x_prev i_lesser 0
exec call find BASE__by_cursor YDLST_NEXT , &x_head i_lesser 0
COND verify allocating the root index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.015)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call allocate BASE_index_new x_count i_equal 0
COND verify reading the database - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.016)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call open SHARED_open x_name , 'R' , &x_db i_equal 0
exec call read BASE_read x_db , x_count i_equal 0
exec call close SHARED_close &x_db i_equal 0
DITTO (1) [ verify current dictionary ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.017)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND populate pointers to items (change order to check) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.018)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call find BASE__by_cursor YDLST_TAIL , &x_head i_equal 0
exec call find BASE__by_cursor YDLST_PREV , &x_prev i_equal 0
exec call find BASE__by_cursor YDLST_PREV , &x_next i_equal 0
exec call find BASE__by_cursor YDLST_PREV , &x_tail i_equal 0
DITTO (2) [ verify indexes ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.019)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND verify freeing root index - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.020)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call free BASE_index_free i_equal 0
exec ... check index BASE_index_get 0 p_equal NULL
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((06.021)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec remove test file yURG_rm x_name i_equal 0
exec stop testing PROG__unit_end i_equal 0
# end-of-file. done, finito, completare, whimper [Ï´···