3
{****************************************************************}
4
{ CODE GENERATOR TEST PROGRAM }
5
{ Copyright (c) 2002 Carl Eric Codere }
6
{****************************************************************}
7
{ NODE TESTED : secondcalln() }
8
{****************************************************************}
9
{ PRE-REQUISITES: secondload() }
13
{****************************************************************}
15
{ FPC = Target is FreePascal compiler }
16
{****************************************************************}
17
{ REMARKS: This tests secondcalln(), genentrycode() and }
18
{ genexitcode() for standard object with the saveregisters }
19
{ calling convention. }
21
{****************************************************************}
27
{ should be defined depending on CPU target }
33
SMALL_INDEX = 13; { value should not be aligned! }
36
RESULT_U16BIT = 2*RESULT_U8BIT;
37
RESULT_S32BIT = $500F0000;
38
RESULT_S64BIT = $500F0000;
39
RESULT_S32REAL = 1777.12;
40
RESULT_S64REAL = 3444.24;
44
RESULT_PCHAR = 'Hello world';
45
RESULT_BIGSTRING = 'Hello world';
46
RESULT_SMALLSTRING = 'H';
48
RESULT_BOOLEAN = TRUE;
52
tprocedure = procedure;
54
tsmallrecord = packed record
59
tlargerecord = packed record
60
b: array[1..BIG_INDEX] of byte;
63
tsmallarray = packed array[1..SMALL_INDEX] of byte;
68
tsmallset = set of tsmallsetenum;
69
tlargeset = set of char;
71
tsmallstring = string[2];
77
global_s32bit : longint;
78
global_s32real : single;
79
global_s64real : double;
81
global_proc : tprocedure;
82
global_bigstring : shortstring;
83
global_boolean : boolean;
85
global_s64bit : int64;
87
value_ansistring : ansistring;
90
value_s32bit : longint;
91
value_s32real : single;
92
value_s64real : double;
93
value_proc : tprocedure;
95
value_smallrec : tsmallrecord;
96
value_largerec : tlargerecord;
97
value_smallset : tsmallset;
98
value_smallstring : tsmallstring;
99
value_bigstring : shortstring;
100
value_largeset : tlargeset;
101
value_smallarray : tsmallarray;
102
value_boolean : boolean;
112
procedure clear_globals;
117
global_s32real := 0.0;
118
global_s64real := 0.0;
121
global_bigstring := '';
122
global_boolean := false;
128
procedure clear_values;
133
value_s32real := 0.0;
134
value_s64real := 0.0;
137
fillchar(value_smallrec, sizeof(value_smallrec), #0);
138
fillchar(value_largerec, sizeof(value_largerec), #0);
139
value_smallset := [];
140
value_smallstring := '';
141
value_bigstring := '';
142
value_largeset := [];
143
fillchar(value_smallarray, sizeof(value_smallarray), #0);
144
value_boolean := false;
146
value_ansistring := '';
151
function getu8: byte;
153
getu8 := RESULT_U8BIT;
159
{ object without vmt }
160
pnovmtobject = ^tnovmtobject;
161
tnovmtobject = object
163
object_bigstring : shortstring;
164
object_u16bit : word;
165
{ no parameter testing }
166
procedure method_public_none;saveregisters;
167
procedure method_public_static_none; static;saveregisters;
168
procedure method_call_private_none;saveregisters;
169
procedure method_call_private_static_none; static;saveregisters;
170
{ simple value parameter testing }
171
procedure method_public_u8(x : byte);saveregisters;
172
procedure method_public_static_u8(x: byte); static;saveregisters;
173
procedure method_call_private_u8(x: byte);saveregisters;
174
procedure method_call_private_static_u8(x: byte); static;saveregisters;
175
function func_array_mixed_nested(b: byte): tsmallarray;saveregisters;
177
procedure method_private_none;saveregisters;
178
procedure method_private_static_none; static;saveregisters;
179
function func_getu16bit : word;saveregisters;
180
{ simple value parameter testing }
181
procedure method_private_u8(x: byte);saveregisters;
182
procedure method_private_static_u8(x: byte); static;saveregisters;
187
pvmtobject = ^tvmtobject;
191
object_u16bit : word;
192
object_bigstring : shortstring;
193
object_s32bit : longint;
194
object_s64bit : int64;
195
constructor constructor_params_mixed(u8 :byte; u16: word;
196
bigstring: shortstring; s32: longint; s64: int64);
197
constructor constructor_init;
198
destructor destructor_params_done;
199
procedure method_normal_params_mixed(u8 :byte; u16: word;
200
bigstring: shortstring; s32: longint; s64: int64);saveregisters;
201
procedure method_virtual_params_mixed(u8 :byte; u16: word;
202
bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
203
procedure method_virtual_overriden_params_mixed(u8 :byte; u16: word;
204
bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
205
procedure method_static_params_mixed(u8 :byte; u16: word;
206
bigstring: shortstring; s32: longint; s64: int64);static;saveregisters;
207
procedure method_normal_call_inherited_params_mixed(
208
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
210
{ virtual methods which call other methods }
211
procedure method_virtual_call_static_params_mixed(
212
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
213
procedure method_virtual_call_virtual_params_mixed(
214
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
215
procedure method_virtual_call_overriden_params_mixed(
216
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
217
procedure method_virtual_call_normal_params_mixed(
218
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
219
procedure method_virtual_call_constructor_params_mixed(
220
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
221
procedure method_virtual_call_inherited_params_mixed(
222
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
226
pheritedvmtobject = ^theritedvmtobject;
227
theritedvmtobject = object(tvmtobject)
228
constructor constructor_params_mixed_call_virtual(u8 :byte; u16: word;
229
bigstring: shortstring; s32: longint; s64: int64);
230
constructor constructor_params_mixed_call_overriden(u8 :byte; u16: word;
231
bigstring: shortstring; s32: longint; s64: int64);
232
constructor constructor_params_mixed_call_static(u8 :byte; u16: word;
233
bigstring: shortstring; s32: longint; s64: int64);
234
constructor constructor_params_mixed_call_normal(u8 :byte; u16: word;
235
bigstring: shortstring; s32: longint; s64: int64);
236
constructor constructor_params_mixed_call_inherited(u8 :byte; u16: word;
237
bigstring: shortstring; s32: longint; s64: int64);
238
procedure method_virtual_overriden_params_mixed(
239
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
241
{ normal methods which call other methods }
242
procedure method_normal_call_static_params_mixed(
243
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
244
procedure method_normal_call_virtual_params_mixed(
245
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
246
procedure method_normal_call_overriden_params_mixed(
247
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
248
procedure method_normal_call_normal_params_mixed(
249
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
250
procedure method_normal_call_constructor_params_mixed(
251
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
252
procedure method_normal_call_inherited_params_mixed(
253
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
255
{ virtual methods which call other methods }
256
procedure method_virtual_call_inherited_params_mixed(
257
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);virtual;saveregisters;
261
pfailvmtobject = ^tfailvmtobject;
262
tfailvmtobject = object(tvmtobject)
264
constructor constructor_public_none;
269
{**************************************************************************}
271
{**************************************************************************}
273
{****************** NO PARAMETERS ******************}
274
procedure tnovmtobject.method_public_none;saveregisters;
276
global_u8bit := RESULT_U8BIT;
280
procedure tnovmtobject.method_public_static_none;saveregisters;
282
global_u8bit := RESULT_U8BIT;
286
procedure tnovmtobject.method_call_private_none;saveregisters;
289
method_private_static_none;
292
procedure tnovmtobject.method_call_private_static_none;saveregisters;
294
method_private_static_none;
298
procedure tnovmtobject.method_private_none;saveregisters;
300
Inc(global_u16bit, RESULT_U8BIT);
304
procedure tnovmtobject.method_private_static_none;saveregisters;
306
Inc(global_u16bit, RESULT_U8BIT);
309
{******************** PARAMETERS ******************}
311
procedure tnovmtobject.method_public_u8(x : byte);saveregisters;
316
procedure tnovmtobject.method_public_static_u8(x: byte);saveregisters;
321
procedure tnovmtobject.method_call_private_u8(x: byte);saveregisters;
323
method_private_static_u8(x);
324
method_private_u8(x);
327
procedure tnovmtobject. method_call_private_static_u8(x: byte);saveregisters;
329
method_private_static_u8(x);
332
procedure tnovmtobject.method_private_u8(x: byte);saveregisters;
334
Inc(global_u16bit,x);
337
procedure tnovmtobject.method_private_static_u8(x: byte);saveregisters;
339
Inc(global_u16bit,x);
343
function tnovmtobject.func_getu16bit : word;saveregisters;
345
func_getu16bit := object_u16bit;
349
complex testing, nested field access, with parameters and
352
On exit : global_u8bit := x;
353
global_u16bit := object_u16bit (from func_getu16bit);
354
global_s32bit := RESULT_S32BIT
355
global_bigstring := object_bigstring
358
function tnovmtobject.func_array_mixed_nested(b: byte): tsmallarray;saveregisters;
360
procedure nested_one_proc(l: longint);
362
global_u16bit := func_getu16bit;
366
procedure nested_two_proc(l : longint);
373
function nested_one_func(level1_b : byte; s: shortstring): byte;
377
function nested_two_func(level2_b : byte; s :shortstring): byte;
379
nested_two_func:=level2_b;
380
global_bigstring := s;
381
nested_one_proc(RESULT_S32BIT);
386
nested_one_func := nested_two_func(level1_b,s1);
387
nested_two_proc(level1_b);
393
smallarray: tsmallarray;
395
fillchar(smallarray, sizeof(smallarray), #0);
396
smallarray[1] := RESULT_U8BIT;
397
smallarray[SMALL_INDEX] := RESULT_U8BIT;
398
func_array_mixed_nested := smallarray;
400
global_u8bit := nested_one_func(local_b, object_bigstring);
403
{**************************************************************************}
405
{**************************************************************************}
406
constructor tfailvmtobject.constructor_public_none;
408
{ this calls the constructor fail special keyword }
412
{**************************************************************************}
414
{**************************************************************************}
415
constructor tvmtobject.constructor_params_mixed(u8 :byte; u16: word;
416
bigstring: shortstring; s32: longint; s64: int64);
419
object_u16bit := u16;
420
object_bigstring := bigstring;
421
object_s32bit := s32;
422
object_s64bit := s64;
426
constructor tvmtobject.constructor_init;
430
object_bigstring := '';
435
destructor tvmtobject.destructor_params_done;
439
object_bigstring := '';
445
procedure tvmtobject.method_normal_params_mixed(
446
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
449
object_u16bit := u16;
450
object_bigstring := bigstring;
451
object_s32bit := s32;
452
object_s64bit := s64;
455
procedure tvmtobject.method_virtual_params_mixed(
456
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
459
object_u16bit := u16;
460
object_bigstring := bigstring;
461
object_s32bit := s32;
462
object_s64bit := s64;
465
{ this one should be overriden }
466
procedure tvmtobject.method_virtual_overriden_params_mixed(
467
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
472
{ can't access field of instances in static methods }
473
procedure tvmtobject.method_static_params_mixed(
474
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
477
global_u16bit := u16;
478
global_bigstring := bigstring;
479
global_s32bit := s32;
480
global_s64bit := s64;
483
procedure tvmtobject.method_normal_call_inherited_params_mixed(
484
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
487
object_u16bit := u16;
488
object_bigstring := bigstring;
489
object_s32bit := s32;
490
object_s64bit := s64;
494
procedure tvmtobject.method_virtual_call_static_params_mixed(
495
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
497
method_static_params_mixed(u8, u16, bigstring, s32, s64);
500
procedure tvmtobject.method_virtual_call_virtual_params_mixed(
501
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
503
method_virtual_params_mixed(u8, u16, bigstring, s32, s64);
506
procedure tvmtobject.method_virtual_call_overriden_params_mixed(
507
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
509
method_virtual_overriden_params_mixed(u8, u16, bigstring, s32, s64);
513
procedure tvmtobject.method_virtual_call_normal_params_mixed(
514
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
516
method_normal_params_mixed(u8, u16, bigstring, s32, s64);
519
procedure tvmtobject.method_virtual_call_constructor_params_mixed(
520
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
522
constructor_params_mixed(u8, u16, bigstring, s32, s64);
525
procedure tvmtobject.method_virtual_call_inherited_params_mixed(
526
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
529
object_u16bit := u16;
530
object_bigstring := bigstring;
531
object_s32bit := s32;
532
object_s64bit := s64;
536
{**************************************************************************}
537
{ INHERITED VMT OBJECT }
538
{**************************************************************************}
539
constructor theritedvmtobject.constructor_params_mixed_call_virtual(
540
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);
544
object_bigstring := '';
547
method_virtual_params_mixed(u8, u16, bigstring, s32, s64);
550
constructor theritedvmtobject.constructor_params_mixed_call_overriden(
551
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);
555
object_bigstring := '';
558
method_virtual_overriden_params_mixed(u8, u16, bigstring, s32, s64);
561
constructor theritedvmtobject.constructor_params_mixed_call_static(
562
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);
566
object_bigstring := '';
569
method_static_params_mixed(u8, u16, bigstring, s32, s64);
572
constructor theritedvmtobject.constructor_params_mixed_call_normal(
573
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);
577
object_bigstring := '';
580
method_normal_params_mixed(u8, u16, bigstring, s32, s64);
583
constructor theritedvmtobject.constructor_params_mixed_call_inherited
584
(u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);
588
object_bigstring := '';
591
inherited constructor_params_mixed(u8, u16, bigstring, s32, s64);
594
{ this one should be overriden }
595
procedure theritedvmtobject.method_virtual_overriden_params_mixed(
596
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);
599
object_u16bit := u16;
600
object_bigstring := bigstring;
601
object_s32bit := s32;
602
object_s64bit := s64;
605
procedure theritedvmtobject.method_normal_call_static_params_mixed(
606
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
608
method_static_params_mixed(u8, u16, bigstring, s32, s64);
611
procedure theritedvmtobject.method_normal_call_virtual_params_mixed(
612
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
614
method_virtual_params_mixed(u8, u16, bigstring, s32, s64);
617
procedure theritedvmtobject.method_normal_call_overriden_params_mixed(
618
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
620
method_virtual_overriden_params_mixed(u8, u16, bigstring, s32, s64);
624
procedure theritedvmtobject.method_normal_call_normal_params_mixed(
625
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
627
method_normal_params_mixed(u8, u16, bigstring, s32, s64);
630
procedure theritedvmtobject.method_normal_call_constructor_params_mixed(
631
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
633
constructor_params_mixed(u8, u16, bigstring, s32, s64);
636
procedure theritedvmtobject.method_normal_call_inherited_params_mixed(
637
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
639
Inherited method_normal_call_inherited_params_mixed(u8, u16, bigstring,
643
procedure theritedvmtobject.method_virtual_call_inherited_params_mixed(
644
u8 :byte; u16: word; bigstring: shortstring; s32: longint; s64: int64);saveregisters;
646
Inherited method_virtual_call_inherited_params_mixed(u8, u16, bigstring,
651
procedure testnovmtobject;
653
novmtobject : tnovmtobject;
656
{******************** STATIC / METHOD SIMPLE CALL **********************}
657
Write('No parameter / method call testing...');
663
tnovmtobject.method_public_static_none;
664
if global_u8bit <> RESULT_U8BIT then
669
novmtobject.method_public_static_none;
670
if global_u8bit <> RESULT_U8BIT then
676
tnovmtobject.method_call_private_static_none;
677
if global_u16bit <> RESULT_U8BIT then
683
novmtobject.method_call_private_static_none;
684
if global_u16bit <> RESULT_U8BIT then
690
novmtobject.method_public_none;
691
if global_u8bit <> RESULT_U8BIT then
697
novmtobject.method_call_private_none;
698
if global_u16bit <> (RESULT_U16BIT) then
706
Write('Simple parameter (LOC_CONSTANT) / method call testing...');
712
{ parameter is LOC_CONSTANT }
713
novmtobject.method_public_u8(RESULT_U8BIT);
714
if global_u8bit <> RESULT_U8BIT then
720
tnovmtobject.method_public_static_u8(RESULT_U8BIT);
721
if global_u8bit <> RESULT_U8BIT then
727
novmtobject.method_public_static_u8(RESULT_U8BIT);
728
if global_u8bit <> RESULT_U8BIT then
734
novmtobject.method_call_private_u8(RESULT_U8BIT);
735
if global_u16bit <> (RESULT_U16BIT) then
741
novmtobject.method_call_private_static_u8(RESULT_U8BIT);
742
if global_u16bit <> (RESULT_U8BIT) then
752
Write('Simple parameter (LOC_REFERENCE) / method call testing...');
758
value_u8bit := RESULT_U8BIT;
759
novmtobject.method_public_u8(value_u8bit);
760
if global_u8bit <> RESULT_U8BIT then
766
value_u8bit := RESULT_U8BIT;
767
tnovmtobject.method_public_static_u8(value_u8bit);
768
if global_u8bit <> RESULT_U8BIT then
774
value_u8bit := RESULT_U8BIT;
775
novmtobject.method_public_static_u8(value_u8bit);
776
if global_u8bit <> RESULT_U8BIT then
782
value_u8bit := RESULT_U8BIT;
783
novmtobject.method_call_private_u8(value_u8bit);
784
if global_u16bit <> (RESULT_U16BIT) then
790
value_u8bit := RESULT_U8BIT;
791
novmtobject.method_call_private_static_u8(value_u8bit);
792
if global_u16bit <> (RESULT_U8BIT) then
800
Write('Simple parameter (LOC_REGISTER) / method call testing...');
806
novmtobject.method_public_u8(getu8);
807
if global_u8bit <> RESULT_U8BIT then
813
tnovmtobject.method_public_static_u8(getu8);
814
if global_u8bit <> RESULT_U8BIT then
820
novmtobject.method_public_static_u8(getu8);
821
if global_u8bit <> RESULT_U8BIT then
827
novmtobject.method_call_private_u8(getu8);
828
if global_u16bit <> (RESULT_U16BIT) then
834
novmtobject.method_call_private_static_u8(getu8);
835
if global_u16bit <> (RESULT_U8BIT) then
843
Write('Simple parameter / complex return / nested method access testing...');
848
novmtobject.object_bigstring := RESULT_BIGSTRING;
849
novmtobject.object_u16bit := RESULT_U16BIT;
851
value_smallarray := novmtobject.func_array_mixed_nested(RESULT_U8BIT);
852
if (value_smallarray[1] <> RESULT_U8BIT) or (value_smallarray[SMALL_INDEX] <> RESULT_U8BIT) then
854
if global_u8bit <> RESULT_U8BIT then
856
if global_bigstring <> RESULT_BIGSTRING then
858
if global_u16bit <> RESULT_U16BIT then
860
if global_s32bit <> RESULT_S32BIT then
862
if global_s64bit <> RESULT_U8BIT then
872
procedure testfailedobject;
874
failedobject : tfailvmtobject;
876
Write('Testing constructor return value...');
877
if failedobject.constructor_public_none then
884
procedure testvmtobject;
886
vmtobject : tvmtobject;
894
Write('Testing mixed parameter (LOC_CONSTANT) constructor call...');
895
vmtobject.constructor_params_mixed(RESULT_U8BIT, RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
896
if vmtobject.object_u8bit <> RESULT_U8BIT then
898
if vmtobject.object_u16bit <> RESULT_U16BIT then
900
if vmtobject.object_s32bit <> RESULT_S32BIT then
902
if vmtobject.object_s64bit <> RESULT_S64BIT then
904
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
906
vmtobject.destructor_params_done;
917
Write('Testing mixed parameter (LOC_REFERENCE) constructor call...');
918
value_u8bit := RESULT_U8BIT;
919
value_u16bit := RESULT_U16BIT;
920
value_bigstring := RESULT_BIGSTRING;
921
value_s32bit := RESULT_S32BIT;
922
value_s64bit := RESULT_S64BIT;
923
vmtobject.constructor_params_mixed(value_u8bit, value_u16bit, value_bigstring,
924
value_s32bit, value_s64bit);
925
if vmtobject.object_u8bit <> RESULT_U8BIT then
927
if vmtobject.object_u16bit <> RESULT_U16BIT then
929
if vmtobject.object_s32bit <> RESULT_S32BIT then
931
if vmtobject.object_s64bit <> RESULT_S64BIT then
933
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
935
vmtobject.destructor_params_done;
945
procedure testheritedvmtobject;
947
vmtobject : theritedvmtobject;
950
{********************** CONSTRUCTOR TESTING ************************}
951
{********************** DESTRUCTOR TESTING ************************}
956
Write('Testing mixed parameter (LOC_CONSTANT) inherited constructor call...');
957
vmtobject.constructor_params_mixed_call_inherited(RESULT_U8BIT, RESULT_U16BIT, RESULT_BIGSTRING,
958
RESULT_S32BIT, RESULT_S64BIT);
959
if vmtobject.object_u8bit <> RESULT_U8BIT then
961
if vmtobject.object_u16bit <> RESULT_U16BIT then
963
if vmtobject.object_s32bit <> RESULT_S32BIT then
965
if vmtobject.object_s64bit <> RESULT_S64BIT then
967
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
969
vmtobject.destructor_params_done;
980
Write('Testing mixed parameter (LOC_REFERENCE) inherited constructor call...');
981
value_u8bit := RESULT_U8BIT;
982
value_u16bit := RESULT_U16BIT;
983
value_bigstring := RESULT_BIGSTRING;
984
value_s32bit := RESULT_S32BIT;
985
value_s64bit := RESULT_S64BIT;
986
vmtobject.constructor_params_mixed_call_inherited(value_u8bit,
987
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
988
if vmtobject.object_u8bit <> RESULT_U8BIT then
990
if vmtobject.object_u16bit <> RESULT_U16BIT then
992
if vmtobject.object_s32bit <> RESULT_S32BIT then
994
if vmtobject.object_s64bit <> RESULT_S64BIT then
996
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
998
vmtobject.destructor_params_done;
1009
Write('Testing mixed parameter (LOC_CONSTANT) constructor call w/virtual call...');
1010
vmtobject.constructor_params_mixed_call_virtual(RESULT_U8BIT,
1011
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1012
if vmtobject.object_u8bit <> RESULT_U8BIT then
1014
if vmtobject.object_u16bit <> RESULT_U16BIT then
1016
if vmtobject.object_s32bit <> RESULT_S32BIT then
1018
if vmtobject.object_s64bit <> RESULT_S64BIT then
1020
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1022
vmtobject.destructor_params_done;
1033
Write('Testing mixed parameter (LOC_REFERENCE) constructor call w/virtual call...');
1034
value_u8bit := RESULT_U8BIT;
1035
value_u16bit := RESULT_U16BIT;
1036
value_bigstring := RESULT_BIGSTRING;
1037
value_s32bit := RESULT_S32BIT;
1038
value_s64bit := RESULT_S64BIT;
1039
vmtobject.constructor_params_mixed_call_virtual(value_u8bit,
1040
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1041
if vmtobject.object_u8bit <> RESULT_U8BIT then
1043
if vmtobject.object_u16bit <> RESULT_U16BIT then
1045
if vmtobject.object_s32bit <> RESULT_S32BIT then
1047
if vmtobject.object_s64bit <> RESULT_S64BIT then
1049
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1051
vmtobject.destructor_params_done;
1062
Write('Testing mixed parameter (LOC_CONSTANT) constructor call w/virtual call...');
1063
vmtobject.constructor_params_mixed_call_overriden(RESULT_U8BIT,
1064
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1065
if vmtobject.object_u8bit <> RESULT_U8BIT then
1067
if vmtobject.object_u16bit <> RESULT_U16BIT then
1069
if vmtobject.object_s32bit <> RESULT_S32BIT then
1071
if vmtobject.object_s64bit <> RESULT_S64BIT then
1073
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1075
vmtobject.destructor_params_done;
1086
Write('Testing mixed parameter (LOC_REFERENCE) constructor call w/virtual call...');
1087
value_u8bit := RESULT_U8BIT;
1088
value_u16bit := RESULT_U16BIT;
1089
value_bigstring := RESULT_BIGSTRING;
1090
value_s32bit := RESULT_S32BIT;
1091
value_s64bit := RESULT_S64BIT;
1092
vmtobject.constructor_params_mixed_call_overriden(value_u8bit,
1093
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1094
if vmtobject.object_u8bit <> RESULT_U8BIT then
1096
if vmtobject.object_u16bit <> RESULT_U16BIT then
1098
if vmtobject.object_s32bit <> RESULT_S32BIT then
1100
if vmtobject.object_s64bit <> RESULT_S64BIT then
1102
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1104
vmtobject.destructor_params_done;
1115
Write('Testing mixed parameter (LOC_CONSTANT) constructor call w/method call...');
1116
vmtobject.constructor_params_mixed_call_normal(RESULT_U8BIT,
1117
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1118
if vmtobject.object_u8bit <> RESULT_U8BIT then
1120
if vmtobject.object_u16bit <> RESULT_U16BIT then
1122
if vmtobject.object_s32bit <> RESULT_S32BIT then
1124
if vmtobject.object_s64bit <> RESULT_S64BIT then
1126
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1128
vmtobject.destructor_params_done;
1139
Write('Testing mixed parameter (LOC_REFERENCE) constructor call w/method call...');
1140
value_u8bit := RESULT_U8BIT;
1141
value_u16bit := RESULT_U16BIT;
1142
value_bigstring := RESULT_BIGSTRING;
1143
value_s32bit := RESULT_S32BIT;
1144
value_s64bit := RESULT_S64BIT;
1145
vmtobject.constructor_params_mixed_call_normal(value_u8bit,
1146
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1147
if vmtobject.object_u8bit <> RESULT_U8BIT then
1149
if vmtobject.object_u16bit <> RESULT_U16BIT then
1151
if vmtobject.object_s32bit <> RESULT_S32BIT then
1153
if vmtobject.object_s64bit <> RESULT_S64BIT then
1155
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1157
vmtobject.destructor_params_done;
1168
Write('Testing mixed parameter (LOC_CONSTANT) constructor call w/static call...');
1169
vmtobject.constructor_params_mixed_call_static(RESULT_U8BIT,
1170
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1171
if global_u8bit <> RESULT_U8BIT then
1173
if global_u16bit <> RESULT_U16BIT then
1175
if global_s32bit <> RESULT_S32BIT then
1177
if global_s64bit <> RESULT_S64BIT then
1179
if global_bigstring <> RESULT_BIGSTRING then
1181
vmtobject.destructor_params_done;
1192
Write('Testing mixed parameter (LOC_REFERENCE) constructor call w/static call...');
1193
value_u8bit := RESULT_U8BIT;
1194
value_u16bit := RESULT_U16BIT;
1195
value_bigstring := RESULT_BIGSTRING;
1196
value_s32bit := RESULT_S32BIT;
1197
value_s64bit := RESULT_S64BIT;
1198
vmtobject.constructor_params_mixed_call_static(value_u8bit,
1199
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1200
if global_u8bit <> RESULT_U8BIT then
1202
if global_u16bit <> RESULT_U16BIT then
1204
if global_s32bit <> RESULT_S32BIT then
1206
if global_s64bit <> RESULT_S64BIT then
1208
if global_bigstring <> RESULT_BIGSTRING then
1210
vmtobject.destructor_params_done;
1217
{************************* METHOD TESTING **************************}
1222
vmtobject.constructor_init;
1223
Write('Testing mixed parameter (LOC_CONSTANT) virtual method call...');
1224
vmtobject.method_virtual_params_mixed(RESULT_U8BIT,
1225
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1226
if vmtobject.object_u8bit <> RESULT_U8BIT then
1228
if vmtobject.object_u16bit <> RESULT_U16BIT then
1230
if vmtobject.object_s32bit <> RESULT_S32BIT then
1232
if vmtobject.object_s64bit <> RESULT_S64BIT then
1234
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1236
vmtobject.destructor_params_done;
1247
vmtobject.constructor_init;
1248
Write('Testing mixed parameter (LOC_REFERENCE) virtual method call...');
1249
value_u8bit := RESULT_U8BIT;
1250
value_u16bit := RESULT_U16BIT;
1251
value_bigstring := RESULT_BIGSTRING;
1252
value_s32bit := RESULT_S32BIT;
1253
value_s64bit := RESULT_S64BIT;
1254
vmtobject.method_virtual_params_mixed(value_u8bit,
1255
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1256
if vmtobject.object_u8bit <> RESULT_U8BIT then
1258
if vmtobject.object_u16bit <> RESULT_U16BIT then
1260
if vmtobject.object_s32bit <> RESULT_S32BIT then
1262
if vmtobject.object_s64bit <> RESULT_S64BIT then
1264
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1266
vmtobject.destructor_params_done;
1277
vmtobject.constructor_init;
1278
Write('Testing mixed parameter (LOC_CONSTANT) virtual method call...');
1279
vmtobject.method_virtual_overriden_params_mixed(RESULT_U8BIT,
1280
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1281
if vmtobject.object_u8bit <> RESULT_U8BIT then
1283
if vmtobject.object_u16bit <> RESULT_U16BIT then
1285
if vmtobject.object_s32bit <> RESULT_S32BIT then
1287
if vmtobject.object_s64bit <> RESULT_S64BIT then
1289
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1291
vmtobject.destructor_params_done;
1302
vmtobject.constructor_init;
1303
Write('Testing mixed parameter (LOC_REFERENCE) virtual method call...');
1304
value_u8bit := RESULT_U8BIT;
1305
value_u16bit := RESULT_U16BIT;
1306
value_bigstring := RESULT_BIGSTRING;
1307
value_s32bit := RESULT_S32BIT;
1308
value_s64bit := RESULT_S64BIT;
1309
vmtobject.method_virtual_overriden_params_mixed(value_u8bit,
1310
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1311
if vmtobject.object_u8bit <> RESULT_U8BIT then
1313
if vmtobject.object_u16bit <> RESULT_U16BIT then
1315
if vmtobject.object_s32bit <> RESULT_S32BIT then
1317
if vmtobject.object_s64bit <> RESULT_S64BIT then
1319
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1321
vmtobject.destructor_params_done;
1332
vmtobject.constructor_init;
1333
Write('Testing mixed parameter (LOC_CONSTANT) method call...');
1334
vmtobject.method_normal_params_mixed(RESULT_U8BIT,
1335
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1336
if vmtobject.object_u8bit <> RESULT_U8BIT then
1338
if vmtobject.object_u16bit <> RESULT_U16BIT then
1340
if vmtobject.object_s32bit <> RESULT_S32BIT then
1342
if vmtobject.object_s64bit <> RESULT_S64BIT then
1344
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1346
vmtobject.destructor_params_done;
1357
vmtobject.constructor_init;
1358
Write('Testing mixed parameter (LOC_REFERENCE) method call...');
1359
value_u8bit := RESULT_U8BIT;
1360
value_u16bit := RESULT_U16BIT;
1361
value_bigstring := RESULT_BIGSTRING;
1362
value_s32bit := RESULT_S32BIT;
1363
value_s64bit := RESULT_S64BIT;
1364
vmtobject.method_normal_params_mixed(value_u8bit,
1365
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1366
if vmtobject.object_u8bit <> RESULT_U8BIT then
1368
if vmtobject.object_u16bit <> RESULT_U16BIT then
1370
if vmtobject.object_s32bit <> RESULT_S32BIT then
1372
if vmtobject.object_s64bit <> RESULT_S64BIT then
1374
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1376
vmtobject.destructor_params_done;
1387
vmtobject.constructor_init;
1388
Write('Testing mixed parameter (LOC_CONSTANT) static method call...');
1389
vmtobject.method_static_params_mixed(RESULT_U8BIT,
1390
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1391
if global_u8bit <> RESULT_U8BIT then
1393
if global_u16bit <> RESULT_U16BIT then
1395
if global_s32bit <> RESULT_S32BIT then
1397
if global_s64bit <> RESULT_S64BIT then
1399
if global_bigstring <> RESULT_BIGSTRING then
1401
vmtobject.destructor_params_done;
1412
vmtobject.constructor_init;
1413
Write('Testing mixed parameter (LOC_REFERENCE) static method call...');
1414
value_u8bit := RESULT_U8BIT;
1415
value_u16bit := RESULT_U16BIT;
1416
value_bigstring := RESULT_BIGSTRING;
1417
value_s32bit := RESULT_S32BIT;
1418
value_s64bit := RESULT_S64BIT;
1419
vmtobject.method_static_params_mixed(value_u8bit,
1420
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1421
if global_u8bit <> RESULT_U8BIT then
1423
if global_u16bit <> RESULT_U16BIT then
1425
if global_s32bit <> RESULT_S32BIT then
1427
if global_s64bit <> RESULT_S64BIT then
1429
if global_bigstring <> RESULT_BIGSTRING then
1431
vmtobject.destructor_params_done;
1438
{ ********************************************************************
1439
This calls methods which in turn call other methods, or a constructor
1441
*********************************************************************
1446
{ Calls the ancestor virtual method }
1447
vmtobject.constructor_init;
1448
Write('Testing mixed parameter (LOC_CONSTANT) method call w/virtual call...');
1449
vmtobject.method_normal_call_virtual_params_mixed(RESULT_U8BIT,
1450
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1451
if vmtobject.object_u8bit <> RESULT_U8BIT then
1453
if vmtobject.object_u16bit <> RESULT_U16BIT then
1455
if vmtobject.object_s32bit <> RESULT_S32BIT then
1457
if vmtobject.object_s64bit <> RESULT_S64BIT then
1459
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1461
vmtobject.destructor_params_done;
1472
vmtobject.constructor_init;
1473
Write('Testing mixed parameter (LOC_REFERENCE) method call w/virtual call...');
1474
value_u8bit := RESULT_U8BIT;
1475
value_u16bit := RESULT_U16BIT;
1476
value_bigstring := RESULT_BIGSTRING;
1477
value_s32bit := RESULT_S32BIT;
1478
value_s64bit := RESULT_S64BIT;
1479
vmtobject.method_normal_call_virtual_params_mixed(value_u8bit,
1480
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1481
if vmtobject.object_u8bit <> RESULT_U8BIT then
1483
if vmtobject.object_u16bit <> RESULT_U16BIT then
1485
if vmtobject.object_s32bit <> RESULT_S32BIT then
1487
if vmtobject.object_s64bit <> RESULT_S64BIT then
1489
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1491
vmtobject.destructor_params_done;
1498
{ The virtual method has been overriden by the object in this case }
1499
vmtobject.constructor_init;
1500
Write('Testing mixed parameter (LOC_CONSTANT) method call w/virtual call...');
1501
vmtobject.method_normal_call_overriden_params_mixed(RESULT_U8BIT,
1502
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1503
if vmtobject.object_u8bit <> RESULT_U8BIT then
1505
if vmtobject.object_u16bit <> RESULT_U16BIT then
1507
if vmtobject.object_s32bit <> RESULT_S32BIT then
1509
if vmtobject.object_s64bit <> RESULT_S64BIT then
1511
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1513
vmtobject.destructor_params_done;
1524
vmtobject.constructor_init;
1525
Write('Testing mixed parameter (LOC_REFERENCE) method call w/virtual call...');
1526
value_u8bit := RESULT_U8BIT;
1527
value_u16bit := RESULT_U16BIT;
1528
value_bigstring := RESULT_BIGSTRING;
1529
value_s32bit := RESULT_S32BIT;
1530
value_s64bit := RESULT_S64BIT;
1531
vmtobject.method_normal_call_overriden_params_mixed(value_u8bit,
1532
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1533
if vmtobject.object_u8bit <> RESULT_U8BIT then
1535
if vmtobject.object_u16bit <> RESULT_U16BIT then
1537
if vmtobject.object_s32bit <> RESULT_S32BIT then
1539
if vmtobject.object_s64bit <> RESULT_S64BIT then
1541
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1543
vmtobject.destructor_params_done;
1554
vmtobject.constructor_init;
1555
Write('Testing mixed parameter (LOC_CONSTANT) method call w/normal call...');
1556
vmtobject.method_normal_call_normal_params_mixed(RESULT_U8BIT,
1557
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1558
if vmtobject.object_u8bit <> RESULT_U8BIT then
1560
if vmtobject.object_u16bit <> RESULT_U16BIT then
1562
if vmtobject.object_s32bit <> RESULT_S32BIT then
1564
if vmtobject.object_s64bit <> RESULT_S64BIT then
1566
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1568
vmtobject.destructor_params_done;
1579
vmtobject.constructor_init;
1580
Write('Testing mixed parameter (LOC_REFERENCE) method call w/normal call...');
1581
value_u8bit := RESULT_U8BIT;
1582
value_u16bit := RESULT_U16BIT;
1583
value_bigstring := RESULT_BIGSTRING;
1584
value_s32bit := RESULT_S32BIT;
1585
value_s64bit := RESULT_S64BIT;
1586
vmtobject.method_normal_call_normal_params_mixed(value_u8bit,
1587
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1588
if vmtobject.object_u8bit <> RESULT_U8BIT then
1590
if vmtobject.object_u16bit <> RESULT_U16BIT then
1592
if vmtobject.object_s32bit <> RESULT_S32BIT then
1594
if vmtobject.object_s64bit <> RESULT_S64BIT then
1596
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1598
vmtobject.destructor_params_done;
1605
(* constructor call inside a normal method *)
1611
vmtobject.constructor_init;
1612
Write('Testing mixed parameter (LOC_CONSTANT) method call w/constructor call...');
1613
vmtobject.method_normal_call_constructor_params_mixed(RESULT_U8BIT,
1614
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1615
if vmtobject.object_u8bit <> RESULT_U8BIT then
1617
if vmtobject.object_u16bit <> RESULT_U16BIT then
1619
if vmtobject.object_s32bit <> RESULT_S32BIT then
1621
if vmtobject.object_s64bit <> RESULT_S64BIT then
1623
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1625
vmtobject.destructor_params_done;
1636
vmtobject.constructor_init;
1637
Write('Testing mixed parameter (LOC_REFERENCE) method call w/constructor call...');
1638
value_u8bit := RESULT_U8BIT;
1639
value_u16bit := RESULT_U16BIT;
1640
value_bigstring := RESULT_BIGSTRING;
1641
value_s32bit := RESULT_S32BIT;
1642
value_s64bit := RESULT_S64BIT;
1643
vmtobject.method_normal_call_constructor_params_mixed(value_u8bit,
1644
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1645
if vmtobject.object_u8bit <> RESULT_U8BIT then
1647
if vmtobject.object_u16bit <> RESULT_U16BIT then
1649
if vmtobject.object_s32bit <> RESULT_S32BIT then
1651
if vmtobject.object_s64bit <> RESULT_S64BIT then
1653
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1655
vmtobject.destructor_params_done;
1662
{ static method call }
1667
vmtobject.constructor_init;
1668
Write('Testing mixed parameter (LOC_CONSTANT) method call w/static call...');
1669
vmtobject.method_normal_call_static_params_mixed(RESULT_U8BIT,
1670
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1671
if global_u8bit <> RESULT_U8BIT then
1673
if global_u16bit <> RESULT_U16BIT then
1675
if global_s32bit <> RESULT_S32BIT then
1677
if global_s64bit <> RESULT_S64BIT then
1679
if global_bigstring <> RESULT_BIGSTRING then
1681
vmtobject.destructor_params_done;
1692
vmtobject.constructor_init;
1693
Write('Testing mixed parameter (LOC_REFERENCE) method call w/static call...');
1694
value_u8bit := RESULT_U8BIT;
1695
value_u16bit := RESULT_U16BIT;
1696
value_bigstring := RESULT_BIGSTRING;
1697
value_s32bit := RESULT_S32BIT;
1698
value_s64bit := RESULT_S64BIT;
1699
vmtobject.method_normal_call_static_params_mixed(value_u8bit,
1700
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1701
if global_u8bit <> RESULT_U8BIT then
1703
if global_u16bit <> RESULT_U16BIT then
1705
if global_s32bit <> RESULT_S32BIT then
1707
if global_s64bit <> RESULT_S64BIT then
1709
if global_bigstring <> RESULT_BIGSTRING then
1711
vmtobject.destructor_params_done;
1718
(* calls the inherited method *)
1722
{ Calls the ancestor virtual method }
1723
vmtobject.constructor_init;
1724
Write('Testing mixed parameter (LOC_CONSTANT) method call w/inherited call...');
1725
vmtobject.method_normal_call_inherited_params_mixed(RESULT_U8BIT,
1726
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1727
if vmtobject.object_u8bit <> RESULT_U8BIT then
1729
if vmtobject.object_u16bit <> RESULT_U16BIT then
1731
if vmtobject.object_s32bit <> RESULT_S32BIT then
1733
if vmtobject.object_s64bit <> RESULT_S64BIT then
1735
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1737
vmtobject.destructor_params_done;
1748
vmtobject.constructor_init;
1749
Write('Testing mixed parameter (LOC_REFERENCE) method call w/inherited call...');
1750
value_u8bit := RESULT_U8BIT;
1751
value_u16bit := RESULT_U16BIT;
1752
value_bigstring := RESULT_BIGSTRING;
1753
value_s32bit := RESULT_S32BIT;
1754
value_s64bit := RESULT_S64BIT;
1755
vmtobject.method_normal_call_inherited_params_mixed(value_u8bit,
1756
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1757
if vmtobject.object_u8bit <> RESULT_U8BIT then
1759
if vmtobject.object_u16bit <> RESULT_U16BIT then
1761
if vmtobject.object_s32bit <> RESULT_S32BIT then
1763
if vmtobject.object_s64bit <> RESULT_S64BIT then
1765
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1767
vmtobject.destructor_params_done;
1774
{ ********************************************************************
1775
This calls virtual methods which in turn call other methods,
1776
or a constructor or a destructor.
1777
*********************************************************************
1782
{ Calls the ancestor virtual method }
1783
vmtobject.constructor_init;
1784
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/virtual call...');
1785
vmtobject.method_virtual_call_virtual_params_mixed(RESULT_U8BIT,
1786
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1787
if vmtobject.object_u8bit <> RESULT_U8BIT then
1789
if vmtobject.object_u16bit <> RESULT_U16BIT then
1791
if vmtobject.object_s32bit <> RESULT_S32BIT then
1793
if vmtobject.object_s64bit <> RESULT_S64BIT then
1795
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1797
vmtobject.destructor_params_done;
1808
vmtobject.constructor_init;
1809
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/virtual call...');
1810
value_u8bit := RESULT_U8BIT;
1811
value_u16bit := RESULT_U16BIT;
1812
value_bigstring := RESULT_BIGSTRING;
1813
value_s32bit := RESULT_S32BIT;
1814
value_s64bit := RESULT_S64BIT;
1815
vmtobject.method_virtual_call_virtual_params_mixed(value_u8bit,
1816
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1817
if vmtobject.object_u8bit <> RESULT_U8BIT then
1819
if vmtobject.object_u16bit <> RESULT_U16BIT then
1821
if vmtobject.object_s32bit <> RESULT_S32BIT then
1823
if vmtobject.object_s64bit <> RESULT_S64BIT then
1825
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1827
vmtobject.destructor_params_done;
1834
{ The virtual method has been overriden by the object in this case }
1835
vmtobject.constructor_init;
1836
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/virtual call...');
1837
vmtobject.method_virtual_call_overriden_params_mixed(RESULT_U8BIT,
1838
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1839
if vmtobject.object_u8bit <> RESULT_U8BIT then
1841
if vmtobject.object_u16bit <> RESULT_U16BIT then
1843
if vmtobject.object_s32bit <> RESULT_S32BIT then
1845
if vmtobject.object_s64bit <> RESULT_S64BIT then
1847
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1849
vmtobject.destructor_params_done;
1860
vmtobject.constructor_init;
1861
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/virtual call...');
1862
value_u8bit := RESULT_U8BIT;
1863
value_u16bit := RESULT_U16BIT;
1864
value_bigstring := RESULT_BIGSTRING;
1865
value_s32bit := RESULT_S32BIT;
1866
value_s64bit := RESULT_S64BIT;
1867
vmtobject.method_virtual_call_overriden_params_mixed(value_u8bit,
1868
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1869
if vmtobject.object_u8bit <> RESULT_U8BIT then
1871
if vmtobject.object_u16bit <> RESULT_U16BIT then
1873
if vmtobject.object_s32bit <> RESULT_S32BIT then
1875
if vmtobject.object_s64bit <> RESULT_S64BIT then
1877
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1879
vmtobject.destructor_params_done;
1890
vmtobject.constructor_init;
1891
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/normal call...');
1892
vmtobject.method_virtual_call_normal_params_mixed(RESULT_U8BIT,
1893
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1894
if vmtobject.object_u8bit <> RESULT_U8BIT then
1896
if vmtobject.object_u16bit <> RESULT_U16BIT then
1898
if vmtobject.object_s32bit <> RESULT_S32BIT then
1900
if vmtobject.object_s64bit <> RESULT_S64BIT then
1902
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1904
vmtobject.destructor_params_done;
1915
vmtobject.constructor_init;
1916
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/normal call...');
1917
value_u8bit := RESULT_U8BIT;
1918
value_u16bit := RESULT_U16BIT;
1919
value_bigstring := RESULT_BIGSTRING;
1920
value_s32bit := RESULT_S32BIT;
1921
value_s64bit := RESULT_S64BIT;
1922
vmtobject.method_virtual_call_normal_params_mixed(value_u8bit,
1923
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1924
if vmtobject.object_u8bit <> RESULT_U8BIT then
1926
if vmtobject.object_u16bit <> RESULT_U16BIT then
1928
if vmtobject.object_s32bit <> RESULT_S32BIT then
1930
if vmtobject.object_s64bit <> RESULT_S64BIT then
1932
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1934
vmtobject.destructor_params_done;
1941
(* constructor call inside a normal method *)
1947
vmtobject.constructor_init;
1948
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/constructor call...');
1949
vmtobject.method_virtual_call_constructor_params_mixed(RESULT_U8BIT,
1950
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
1951
if vmtobject.object_u8bit <> RESULT_U8BIT then
1953
if vmtobject.object_u16bit <> RESULT_U16BIT then
1955
if vmtobject.object_s32bit <> RESULT_S32BIT then
1957
if vmtobject.object_s64bit <> RESULT_S64BIT then
1959
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1961
vmtobject.destructor_params_done;
1972
vmtobject.constructor_init;
1973
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/constructor call...');
1974
value_u8bit := RESULT_U8BIT;
1975
value_u16bit := RESULT_U16BIT;
1976
value_bigstring := RESULT_BIGSTRING;
1977
value_s32bit := RESULT_S32BIT;
1978
value_s64bit := RESULT_S64BIT;
1979
vmtobject.method_virtual_call_constructor_params_mixed(value_u8bit,
1980
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
1981
if vmtobject.object_u8bit <> RESULT_U8BIT then
1983
if vmtobject.object_u16bit <> RESULT_U16BIT then
1985
if vmtobject.object_s32bit <> RESULT_S32BIT then
1987
if vmtobject.object_s64bit <> RESULT_S64BIT then
1989
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
1991
vmtobject.destructor_params_done;
1998
{ static virtual call }
2003
vmtobject.constructor_init;
2004
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/static call...');
2005
vmtobject.method_virtual_call_static_params_mixed(RESULT_U8BIT,
2006
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2007
if global_u8bit <> RESULT_U8BIT then
2009
if global_u16bit <> RESULT_U16BIT then
2011
if global_s32bit <> RESULT_S32BIT then
2013
if global_s64bit <> RESULT_S64BIT then
2015
if global_bigstring <> RESULT_BIGSTRING then
2017
vmtobject.destructor_params_done;
2028
vmtobject.constructor_init;
2029
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/static call...');
2030
value_u8bit := RESULT_U8BIT;
2031
value_u16bit := RESULT_U16BIT;
2032
value_bigstring := RESULT_BIGSTRING;
2033
value_s32bit := RESULT_S32BIT;
2034
value_s64bit := RESULT_S64BIT;
2035
vmtobject.method_virtual_call_static_params_mixed(value_u8bit,
2036
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2037
if global_u8bit <> RESULT_U8BIT then
2039
if global_u16bit <> RESULT_U16BIT then
2041
if global_s32bit <> RESULT_S32BIT then
2043
if global_s64bit <> RESULT_S64BIT then
2045
if global_bigstring <> RESULT_BIGSTRING then
2047
vmtobject.destructor_params_done;
2054
(* calls the inherited method *)
2058
{ Calls the ancestor virtual method }
2059
vmtobject.constructor_init;
2060
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/inherited call...');
2061
vmtobject.method_virtual_call_inherited_params_mixed(RESULT_U8BIT,
2062
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2063
if vmtobject.object_u8bit <> RESULT_U8BIT then
2065
if vmtobject.object_u16bit <> RESULT_U16BIT then
2067
if vmtobject.object_s32bit <> RESULT_S32BIT then
2069
if vmtobject.object_s64bit <> RESULT_S64BIT then
2071
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
2073
vmtobject.destructor_params_done;
2084
vmtobject.constructor_init;
2085
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/inherited call...');
2086
value_u8bit := RESULT_U8BIT;
2087
value_u16bit := RESULT_U16BIT;
2088
value_bigstring := RESULT_BIGSTRING;
2089
value_s32bit := RESULT_S32BIT;
2090
value_s64bit := RESULT_S64BIT;
2091
vmtobject.method_virtual_call_inherited_params_mixed(value_u8bit,
2092
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2093
if vmtobject.object_u8bit <> RESULT_U8BIT then
2095
if vmtobject.object_u16bit <> RESULT_U16BIT then
2097
if vmtobject.object_s32bit <> RESULT_S32BIT then
2099
if vmtobject.object_s64bit <> RESULT_S64BIT then
2101
if vmtobject.object_bigstring <> RESULT_BIGSTRING then
2103
vmtobject.destructor_params_done;
2114
{ same as testvmtherited, except uses with statement }
2117
vmtobject : theritedvmtobject;
2122
{********************** CONSTRUCTOR TESTING ************************}
2123
{********************** DESTRUCTOR TESTING ************************}
2128
Write('Testing mixed parameter (LOC_CONSTANT) inherited constructor call...');
2129
constructor_params_mixed_call_inherited(RESULT_U8BIT, RESULT_U16BIT, RESULT_BIGSTRING,
2130
RESULT_S32BIT, RESULT_S64BIT);
2131
if object_u8bit <> RESULT_U8BIT then
2133
if object_u16bit <> RESULT_U16BIT then
2135
if object_s32bit <> RESULT_S32BIT then
2137
if object_s64bit <> RESULT_S64BIT then
2139
if object_bigstring <> RESULT_BIGSTRING then
2141
destructor_params_done;
2152
Write('Testing mixed parameter (LOC_REFERENCE) inherited constructor call...');
2153
value_u8bit := RESULT_U8BIT;
2154
value_u16bit := RESULT_U16BIT;
2155
value_bigstring := RESULT_BIGSTRING;
2156
value_s32bit := RESULT_S32BIT;
2157
value_s64bit := RESULT_S64BIT;
2158
constructor_params_mixed_call_inherited(value_u8bit,
2159
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2160
if object_u8bit <> RESULT_U8BIT then
2162
if object_u16bit <> RESULT_U16BIT then
2164
if object_s32bit <> RESULT_S32BIT then
2166
if object_s64bit <> RESULT_S64BIT then
2168
if object_bigstring <> RESULT_BIGSTRING then
2170
destructor_params_done;
2181
Write('Testing mixed parameter (LOC_CONSTANT) constructor call w/virtual call...');
2182
constructor_params_mixed_call_virtual(RESULT_U8BIT,
2183
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2184
if object_u8bit <> RESULT_U8BIT then
2186
if object_u16bit <> RESULT_U16BIT then
2188
if object_s32bit <> RESULT_S32BIT then
2190
if object_s64bit <> RESULT_S64BIT then
2192
if object_bigstring <> RESULT_BIGSTRING then
2194
destructor_params_done;
2205
Write('Testing mixed parameter (LOC_REFERENCE) constructor call w/virtual call...');
2206
value_u8bit := RESULT_U8BIT;
2207
value_u16bit := RESULT_U16BIT;
2208
value_bigstring := RESULT_BIGSTRING;
2209
value_s32bit := RESULT_S32BIT;
2210
value_s64bit := RESULT_S64BIT;
2211
constructor_params_mixed_call_virtual(value_u8bit,
2212
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2213
if object_u8bit <> RESULT_U8BIT then
2215
if object_u16bit <> RESULT_U16BIT then
2217
if object_s32bit <> RESULT_S32BIT then
2219
if object_s64bit <> RESULT_S64BIT then
2221
if object_bigstring <> RESULT_BIGSTRING then
2223
destructor_params_done;
2234
Write('Testing mixed parameter (LOC_CONSTANT) constructor call w/virtual call...');
2235
constructor_params_mixed_call_overriden(RESULT_U8BIT,
2236
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2237
if object_u8bit <> RESULT_U8BIT then
2239
if object_u16bit <> RESULT_U16BIT then
2241
if object_s32bit <> RESULT_S32BIT then
2243
if object_s64bit <> RESULT_S64BIT then
2245
if object_bigstring <> RESULT_BIGSTRING then
2247
destructor_params_done;
2258
Write('Testing mixed parameter (LOC_REFERENCE) constructor call w/virtual call...');
2259
value_u8bit := RESULT_U8BIT;
2260
value_u16bit := RESULT_U16BIT;
2261
value_bigstring := RESULT_BIGSTRING;
2262
value_s32bit := RESULT_S32BIT;
2263
value_s64bit := RESULT_S64BIT;
2264
constructor_params_mixed_call_overriden(value_u8bit,
2265
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2266
if object_u8bit <> RESULT_U8BIT then
2268
if object_u16bit <> RESULT_U16BIT then
2270
if object_s32bit <> RESULT_S32BIT then
2272
if object_s64bit <> RESULT_S64BIT then
2274
if object_bigstring <> RESULT_BIGSTRING then
2276
destructor_params_done;
2287
Write('Testing mixed parameter (LOC_CONSTANT) constructor call w/method call...');
2288
constructor_params_mixed_call_normal(RESULT_U8BIT,
2289
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2290
if object_u8bit <> RESULT_U8BIT then
2292
if object_u16bit <> RESULT_U16BIT then
2294
if object_s32bit <> RESULT_S32BIT then
2296
if object_s64bit <> RESULT_S64BIT then
2298
if object_bigstring <> RESULT_BIGSTRING then
2300
destructor_params_done;
2311
Write('Testing mixed parameter (LOC_REFERENCE) constructor call w/method call...');
2312
value_u8bit := RESULT_U8BIT;
2313
value_u16bit := RESULT_U16BIT;
2314
value_bigstring := RESULT_BIGSTRING;
2315
value_s32bit := RESULT_S32BIT;
2316
value_s64bit := RESULT_S64BIT;
2317
constructor_params_mixed_call_normal(value_u8bit,
2318
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2319
if object_u8bit <> RESULT_U8BIT then
2321
if object_u16bit <> RESULT_U16BIT then
2323
if object_s32bit <> RESULT_S32BIT then
2325
if object_s64bit <> RESULT_S64BIT then
2327
if object_bigstring <> RESULT_BIGSTRING then
2329
destructor_params_done;
2340
Write('Testing mixed parameter (LOC_CONSTANT) constructor call w/static call...');
2341
constructor_params_mixed_call_static(RESULT_U8BIT,
2342
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2343
if global_u8bit <> RESULT_U8BIT then
2345
if global_u16bit <> RESULT_U16BIT then
2347
if global_s32bit <> RESULT_S32BIT then
2349
if global_s64bit <> RESULT_S64BIT then
2351
if global_bigstring <> RESULT_BIGSTRING then
2353
destructor_params_done;
2364
Write('Testing mixed parameter (LOC_REFERENCE) constructor call w/static call...');
2365
value_u8bit := RESULT_U8BIT;
2366
value_u16bit := RESULT_U16BIT;
2367
value_bigstring := RESULT_BIGSTRING;
2368
value_s32bit := RESULT_S32BIT;
2369
value_s64bit := RESULT_S64BIT;
2370
constructor_params_mixed_call_static(value_u8bit,
2371
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2372
if global_u8bit <> RESULT_U8BIT then
2374
if global_u16bit <> RESULT_U16BIT then
2376
if global_s32bit <> RESULT_S32BIT then
2378
if global_s64bit <> RESULT_S64BIT then
2380
if global_bigstring <> RESULT_BIGSTRING then
2382
destructor_params_done;
2389
{************************* METHOD TESTING **************************}
2395
Write('Testing mixed parameter (LOC_CONSTANT) virtual method call...');
2396
method_virtual_params_mixed(RESULT_U8BIT,
2397
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2398
if object_u8bit <> RESULT_U8BIT then
2400
if object_u16bit <> RESULT_U16BIT then
2402
if object_s32bit <> RESULT_S32BIT then
2404
if object_s64bit <> RESULT_S64BIT then
2406
if object_bigstring <> RESULT_BIGSTRING then
2408
destructor_params_done;
2420
Write('Testing mixed parameter (LOC_REFERENCE) virtual method call...');
2421
value_u8bit := RESULT_U8BIT;
2422
value_u16bit := RESULT_U16BIT;
2423
value_bigstring := RESULT_BIGSTRING;
2424
value_s32bit := RESULT_S32BIT;
2425
value_s64bit := RESULT_S64BIT;
2426
method_virtual_params_mixed(value_u8bit,
2427
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2428
if object_u8bit <> RESULT_U8BIT then
2430
if object_u16bit <> RESULT_U16BIT then
2432
if object_s32bit <> RESULT_S32BIT then
2434
if object_s64bit <> RESULT_S64BIT then
2436
if object_bigstring <> RESULT_BIGSTRING then
2438
destructor_params_done;
2450
Write('Testing mixed parameter (LOC_CONSTANT) virtual method call...');
2451
method_virtual_overriden_params_mixed(RESULT_U8BIT,
2452
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2453
if object_u8bit <> RESULT_U8BIT then
2455
if object_u16bit <> RESULT_U16BIT then
2457
if object_s32bit <> RESULT_S32BIT then
2459
if object_s64bit <> RESULT_S64BIT then
2461
if object_bigstring <> RESULT_BIGSTRING then
2463
destructor_params_done;
2475
Write('Testing mixed parameter (LOC_REFERENCE) virtual method call...');
2476
value_u8bit := RESULT_U8BIT;
2477
value_u16bit := RESULT_U16BIT;
2478
value_bigstring := RESULT_BIGSTRING;
2479
value_s32bit := RESULT_S32BIT;
2480
value_s64bit := RESULT_S64BIT;
2481
method_virtual_overriden_params_mixed(value_u8bit,
2482
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2483
if object_u8bit <> RESULT_U8BIT then
2485
if object_u16bit <> RESULT_U16BIT then
2487
if object_s32bit <> RESULT_S32BIT then
2489
if object_s64bit <> RESULT_S64BIT then
2491
if object_bigstring <> RESULT_BIGSTRING then
2493
destructor_params_done;
2505
Write('Testing mixed parameter (LOC_CONSTANT) method call...');
2506
method_normal_params_mixed(RESULT_U8BIT,
2507
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2508
if object_u8bit <> RESULT_U8BIT then
2510
if object_u16bit <> RESULT_U16BIT then
2512
if object_s32bit <> RESULT_S32BIT then
2514
if object_s64bit <> RESULT_S64BIT then
2516
if object_bigstring <> RESULT_BIGSTRING then
2518
destructor_params_done;
2530
Write('Testing mixed parameter (LOC_REFERENCE) method call...');
2531
value_u8bit := RESULT_U8BIT;
2532
value_u16bit := RESULT_U16BIT;
2533
value_bigstring := RESULT_BIGSTRING;
2534
value_s32bit := RESULT_S32BIT;
2535
value_s64bit := RESULT_S64BIT;
2536
method_normal_params_mixed(value_u8bit,
2537
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2538
if object_u8bit <> RESULT_U8BIT then
2540
if object_u16bit <> RESULT_U16BIT then
2542
if object_s32bit <> RESULT_S32BIT then
2544
if object_s64bit <> RESULT_S64BIT then
2546
if object_bigstring <> RESULT_BIGSTRING then
2548
destructor_params_done;
2560
Write('Testing mixed parameter (LOC_CONSTANT) static method call...');
2561
method_static_params_mixed(RESULT_U8BIT,
2562
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2563
if global_u8bit <> RESULT_U8BIT then
2565
if global_u16bit <> RESULT_U16BIT then
2567
if global_s32bit <> RESULT_S32BIT then
2569
if global_s64bit <> RESULT_S64BIT then
2571
if global_bigstring <> RESULT_BIGSTRING then
2573
destructor_params_done;
2585
Write('Testing mixed parameter (LOC_REFERENCE) static method call...');
2586
value_u8bit := RESULT_U8BIT;
2587
value_u16bit := RESULT_U16BIT;
2588
value_bigstring := RESULT_BIGSTRING;
2589
value_s32bit := RESULT_S32BIT;
2590
value_s64bit := RESULT_S64BIT;
2591
method_static_params_mixed(value_u8bit,
2592
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2593
if global_u8bit <> RESULT_U8BIT then
2595
if global_u16bit <> RESULT_U16BIT then
2597
if global_s32bit <> RESULT_S32BIT then
2599
if global_s64bit <> RESULT_S64BIT then
2601
if global_bigstring <> RESULT_BIGSTRING then
2603
destructor_params_done;
2610
{ ********************************************************************
2611
This calls methods which in turn call other methods, or a constructor
2613
*********************************************************************
2618
{ Calls the ancestor virtual method }
2620
Write('Testing mixed parameter (LOC_CONSTANT) method call w/virtual call...');
2621
method_normal_call_virtual_params_mixed(RESULT_U8BIT,
2622
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2623
if object_u8bit <> RESULT_U8BIT then
2625
if object_u16bit <> RESULT_U16BIT then
2627
if object_s32bit <> RESULT_S32BIT then
2629
if object_s64bit <> RESULT_S64BIT then
2631
if object_bigstring <> RESULT_BIGSTRING then
2633
destructor_params_done;
2645
Write('Testing mixed parameter (LOC_REFERENCE) method call w/virtual call...');
2646
value_u8bit := RESULT_U8BIT;
2647
value_u16bit := RESULT_U16BIT;
2648
value_bigstring := RESULT_BIGSTRING;
2649
value_s32bit := RESULT_S32BIT;
2650
value_s64bit := RESULT_S64BIT;
2651
method_normal_call_virtual_params_mixed(value_u8bit,
2652
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2653
if object_u8bit <> RESULT_U8BIT then
2655
if object_u16bit <> RESULT_U16BIT then
2657
if object_s32bit <> RESULT_S32BIT then
2659
if object_s64bit <> RESULT_S64BIT then
2661
if object_bigstring <> RESULT_BIGSTRING then
2663
destructor_params_done;
2670
{ The virtual method has been overriden by the object in this case }
2672
Write('Testing mixed parameter (LOC_CONSTANT) method call w/virtual call...');
2673
method_normal_call_overriden_params_mixed(RESULT_U8BIT,
2674
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2675
if object_u8bit <> RESULT_U8BIT then
2677
if object_u16bit <> RESULT_U16BIT then
2679
if object_s32bit <> RESULT_S32BIT then
2681
if object_s64bit <> RESULT_S64BIT then
2683
if object_bigstring <> RESULT_BIGSTRING then
2685
destructor_params_done;
2697
Write('Testing mixed parameter (LOC_REFERENCE) method call w/virtual call...');
2698
value_u8bit := RESULT_U8BIT;
2699
value_u16bit := RESULT_U16BIT;
2700
value_bigstring := RESULT_BIGSTRING;
2701
value_s32bit := RESULT_S32BIT;
2702
value_s64bit := RESULT_S64BIT;
2703
method_normal_call_overriden_params_mixed(value_u8bit,
2704
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2705
if object_u8bit <> RESULT_U8BIT then
2707
if object_u16bit <> RESULT_U16BIT then
2709
if object_s32bit <> RESULT_S32BIT then
2711
if object_s64bit <> RESULT_S64BIT then
2713
if object_bigstring <> RESULT_BIGSTRING then
2715
destructor_params_done;
2727
Write('Testing mixed parameter (LOC_CONSTANT) method call w/normal call...');
2728
method_normal_call_normal_params_mixed(RESULT_U8BIT,
2729
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2730
if object_u8bit <> RESULT_U8BIT then
2732
if object_u16bit <> RESULT_U16BIT then
2734
if object_s32bit <> RESULT_S32BIT then
2736
if object_s64bit <> RESULT_S64BIT then
2738
if object_bigstring <> RESULT_BIGSTRING then
2740
destructor_params_done;
2752
Write('Testing mixed parameter (LOC_REFERENCE) method call w/normal call...');
2753
value_u8bit := RESULT_U8BIT;
2754
value_u16bit := RESULT_U16BIT;
2755
value_bigstring := RESULT_BIGSTRING;
2756
value_s32bit := RESULT_S32BIT;
2757
value_s64bit := RESULT_S64BIT;
2758
method_normal_call_normal_params_mixed(value_u8bit,
2759
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2760
if object_u8bit <> RESULT_U8BIT then
2762
if object_u16bit <> RESULT_U16BIT then
2764
if object_s32bit <> RESULT_S32BIT then
2766
if object_s64bit <> RESULT_S64BIT then
2768
if object_bigstring <> RESULT_BIGSTRING then
2770
destructor_params_done;
2777
(* constructor call inside a normal method *)
2784
Write('Testing mixed parameter (LOC_CONSTANT) method call w/constructor call...');
2785
method_normal_call_constructor_params_mixed(RESULT_U8BIT,
2786
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2787
if object_u8bit <> RESULT_U8BIT then
2789
if object_u16bit <> RESULT_U16BIT then
2791
if object_s32bit <> RESULT_S32BIT then
2793
if object_s64bit <> RESULT_S64BIT then
2795
if object_bigstring <> RESULT_BIGSTRING then
2797
destructor_params_done;
2809
Write('Testing mixed parameter (LOC_REFERENCE) method call w/constructor call...');
2810
value_u8bit := RESULT_U8BIT;
2811
value_u16bit := RESULT_U16BIT;
2812
value_bigstring := RESULT_BIGSTRING;
2813
value_s32bit := RESULT_S32BIT;
2814
value_s64bit := RESULT_S64BIT;
2815
method_normal_call_constructor_params_mixed(value_u8bit,
2816
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2817
if object_u8bit <> RESULT_U8BIT then
2819
if object_u16bit <> RESULT_U16BIT then
2821
if object_s32bit <> RESULT_S32BIT then
2823
if object_s64bit <> RESULT_S64BIT then
2825
if object_bigstring <> RESULT_BIGSTRING then
2827
destructor_params_done;
2834
{ static method call }
2840
Write('Testing mixed parameter (LOC_CONSTANT) method call w/static call...');
2841
method_normal_call_static_params_mixed(RESULT_U8BIT,
2842
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2843
if global_u8bit <> RESULT_U8BIT then
2845
if global_u16bit <> RESULT_U16BIT then
2847
if global_s32bit <> RESULT_S32BIT then
2849
if global_s64bit <> RESULT_S64BIT then
2851
if global_bigstring <> RESULT_BIGSTRING then
2853
destructor_params_done;
2865
Write('Testing mixed parameter (LOC_REFERENCE) method call w/static call...');
2866
value_u8bit := RESULT_U8BIT;
2867
value_u16bit := RESULT_U16BIT;
2868
value_bigstring := RESULT_BIGSTRING;
2869
value_s32bit := RESULT_S32BIT;
2870
value_s64bit := RESULT_S64BIT;
2871
method_normal_call_static_params_mixed(value_u8bit,
2872
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2873
if global_u8bit <> RESULT_U8BIT then
2875
if global_u16bit <> RESULT_U16BIT then
2877
if global_s32bit <> RESULT_S32BIT then
2879
if global_s64bit <> RESULT_S64BIT then
2881
if global_bigstring <> RESULT_BIGSTRING then
2883
destructor_params_done;
2890
(* calls the inherited method *)
2894
{ Calls the ancestor virtual method }
2896
Write('Testing mixed parameter (LOC_CONSTANT) method call w/inherited call...');
2897
method_normal_call_inherited_params_mixed(RESULT_U8BIT,
2898
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2899
if object_u8bit <> RESULT_U8BIT then
2901
if object_u16bit <> RESULT_U16BIT then
2903
if object_s32bit <> RESULT_S32BIT then
2905
if object_s64bit <> RESULT_S64BIT then
2907
if object_bigstring <> RESULT_BIGSTRING then
2909
destructor_params_done;
2921
Write('Testing mixed parameter (LOC_REFERENCE) method call w/inherited call...');
2922
value_u8bit := RESULT_U8BIT;
2923
value_u16bit := RESULT_U16BIT;
2924
value_bigstring := RESULT_BIGSTRING;
2925
value_s32bit := RESULT_S32BIT;
2926
value_s64bit := RESULT_S64BIT;
2927
method_normal_call_inherited_params_mixed(value_u8bit,
2928
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2929
if object_u8bit <> RESULT_U8BIT then
2931
if object_u16bit <> RESULT_U16BIT then
2933
if object_s32bit <> RESULT_S32BIT then
2935
if object_s64bit <> RESULT_S64BIT then
2937
if object_bigstring <> RESULT_BIGSTRING then
2939
destructor_params_done;
2946
{ ********************************************************************
2947
This calls virtual methods which in turn call other methods,
2948
or a constructor or a destructor.
2949
*********************************************************************
2954
{ Calls the ancestor virtual method }
2956
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/virtual call...');
2957
method_virtual_call_virtual_params_mixed(RESULT_U8BIT,
2958
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
2959
if object_u8bit <> RESULT_U8BIT then
2961
if object_u16bit <> RESULT_U16BIT then
2963
if object_s32bit <> RESULT_S32BIT then
2965
if object_s64bit <> RESULT_S64BIT then
2967
if object_bigstring <> RESULT_BIGSTRING then
2969
destructor_params_done;
2981
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/virtual call...');
2982
value_u8bit := RESULT_U8BIT;
2983
value_u16bit := RESULT_U16BIT;
2984
value_bigstring := RESULT_BIGSTRING;
2985
value_s32bit := RESULT_S32BIT;
2986
value_s64bit := RESULT_S64BIT;
2987
method_virtual_call_virtual_params_mixed(value_u8bit,
2988
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
2989
if object_u8bit <> RESULT_U8BIT then
2991
if object_u16bit <> RESULT_U16BIT then
2993
if object_s32bit <> RESULT_S32BIT then
2995
if object_s64bit <> RESULT_S64BIT then
2997
if object_bigstring <> RESULT_BIGSTRING then
2999
destructor_params_done;
3006
{ The virtual method has been overriden by the object in this case }
3008
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/virtual call...');
3009
method_virtual_call_overriden_params_mixed(RESULT_U8BIT,
3010
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
3011
if object_u8bit <> RESULT_U8BIT then
3013
if object_u16bit <> RESULT_U16BIT then
3015
if object_s32bit <> RESULT_S32BIT then
3017
if object_s64bit <> RESULT_S64BIT then
3019
if object_bigstring <> RESULT_BIGSTRING then
3021
destructor_params_done;
3033
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/virtual call...');
3034
value_u8bit := RESULT_U8BIT;
3035
value_u16bit := RESULT_U16BIT;
3036
value_bigstring := RESULT_BIGSTRING;
3037
value_s32bit := RESULT_S32BIT;
3038
value_s64bit := RESULT_S64BIT;
3039
method_virtual_call_overriden_params_mixed(value_u8bit,
3040
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
3041
if object_u8bit <> RESULT_U8BIT then
3043
if object_u16bit <> RESULT_U16BIT then
3045
if object_s32bit <> RESULT_S32BIT then
3047
if object_s64bit <> RESULT_S64BIT then
3049
if object_bigstring <> RESULT_BIGSTRING then
3051
destructor_params_done;
3063
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/normal call...');
3064
method_virtual_call_normal_params_mixed(RESULT_U8BIT,
3065
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
3066
if object_u8bit <> RESULT_U8BIT then
3068
if object_u16bit <> RESULT_U16BIT then
3070
if object_s32bit <> RESULT_S32BIT then
3072
if object_s64bit <> RESULT_S64BIT then
3074
if object_bigstring <> RESULT_BIGSTRING then
3076
destructor_params_done;
3088
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/normal call...');
3089
value_u8bit := RESULT_U8BIT;
3090
value_u16bit := RESULT_U16BIT;
3091
value_bigstring := RESULT_BIGSTRING;
3092
value_s32bit := RESULT_S32BIT;
3093
value_s64bit := RESULT_S64BIT;
3094
method_virtual_call_normal_params_mixed(value_u8bit,
3095
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
3096
if object_u8bit <> RESULT_U8BIT then
3098
if object_u16bit <> RESULT_U16BIT then
3100
if object_s32bit <> RESULT_S32BIT then
3102
if object_s64bit <> RESULT_S64BIT then
3104
if object_bigstring <> RESULT_BIGSTRING then
3106
destructor_params_done;
3113
(* constructor call inside a normal method *)
3120
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/constructor call...');
3121
method_virtual_call_constructor_params_mixed(RESULT_U8BIT,
3122
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
3123
if object_u8bit <> RESULT_U8BIT then
3125
if object_u16bit <> RESULT_U16BIT then
3127
if object_s32bit <> RESULT_S32BIT then
3129
if object_s64bit <> RESULT_S64BIT then
3131
if object_bigstring <> RESULT_BIGSTRING then
3133
destructor_params_done;
3145
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/constructor call...');
3146
value_u8bit := RESULT_U8BIT;
3147
value_u16bit := RESULT_U16BIT;
3148
value_bigstring := RESULT_BIGSTRING;
3149
value_s32bit := RESULT_S32BIT;
3150
value_s64bit := RESULT_S64BIT;
3151
method_virtual_call_constructor_params_mixed(value_u8bit,
3152
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
3153
if object_u8bit <> RESULT_U8BIT then
3155
if object_u16bit <> RESULT_U16BIT then
3157
if object_s32bit <> RESULT_S32BIT then
3159
if object_s64bit <> RESULT_S64BIT then
3161
if object_bigstring <> RESULT_BIGSTRING then
3163
destructor_params_done;
3170
{ static virtual call }
3176
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/static call...');
3177
method_virtual_call_static_params_mixed(RESULT_U8BIT,
3178
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
3179
if global_u8bit <> RESULT_U8BIT then
3181
if global_u16bit <> RESULT_U16BIT then
3183
if global_s32bit <> RESULT_S32BIT then
3185
if global_s64bit <> RESULT_S64BIT then
3187
if global_bigstring <> RESULT_BIGSTRING then
3189
destructor_params_done;
3201
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/static call...');
3202
value_u8bit := RESULT_U8BIT;
3203
value_u16bit := RESULT_U16BIT;
3204
value_bigstring := RESULT_BIGSTRING;
3205
value_s32bit := RESULT_S32BIT;
3206
value_s64bit := RESULT_S64BIT;
3207
method_virtual_call_static_params_mixed(value_u8bit,
3208
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
3209
if global_u8bit <> RESULT_U8BIT then
3211
if global_u16bit <> RESULT_U16BIT then
3213
if global_s32bit <> RESULT_S32BIT then
3215
if global_s64bit <> RESULT_S64BIT then
3217
if global_bigstring <> RESULT_BIGSTRING then
3219
destructor_params_done;
3226
(* calls the inherited method *)
3230
{ Calls the ancestor virtual method }
3232
Write('Testing mixed parameter (LOC_CONSTANT) virtual call w/inherited call...');
3233
method_virtual_call_inherited_params_mixed(RESULT_U8BIT,
3234
RESULT_U16BIT, RESULT_BIGSTRING, RESULT_S32BIT, RESULT_S64BIT);
3235
if object_u8bit <> RESULT_U8BIT then
3237
if object_u16bit <> RESULT_U16BIT then
3239
if object_s32bit <> RESULT_S32BIT then
3241
if object_s64bit <> RESULT_S64BIT then
3243
if object_bigstring <> RESULT_BIGSTRING then
3245
destructor_params_done;
3257
Write('Testing mixed parameter (LOC_REFERENCE) virtual call w/inherited call...');
3258
value_u8bit := RESULT_U8BIT;
3259
value_u16bit := RESULT_U16BIT;
3260
value_bigstring := RESULT_BIGSTRING;
3261
value_s32bit := RESULT_S32BIT;
3262
value_s64bit := RESULT_S64BIT;
3263
method_virtual_call_inherited_params_mixed(value_u8bit,
3264
value_u16bit, value_bigstring, value_s32bit, value_s64bit);
3265
if object_u8bit <> RESULT_U8BIT then
3267
if object_u16bit <> RESULT_U16BIT then
3269
if object_s32bit <> RESULT_S32BIT then
3271
if object_s64bit <> RESULT_S64BIT then
3273
if object_bigstring <> RESULT_BIGSTRING then
3275
destructor_params_done;
3286
WriteLN('*********************** NO VMT OBJECT TESTS ********************');
3288
WriteLN('************************ VMT OBJECT FAIL **********************');
3290
WriteLN('************************* VMT OBJECT TESTS *********************');
3292
testheritedvmtobject;
3293
WriteLN('**************** VMT OBJECT TESTS USING WITH *******************');