1
{****************************************************************}
2
{ CODE GENERATOR TEST PROGRAM }
3
{ By Carl Eric Codere }
4
{****************************************************************}
5
{ NODE TESTED : secondcallparan() }
6
{****************************************************************}
7
{ PRE-REQUISITES: secondload() }
13
{****************************************************************}
15
{ FPC = Target is FreePascal compiler }
16
{****************************************************************}
17
{ REMARKS: This tests a subset of the secondcalln() node }
18
{ (value parameters with pascal calling convention) }
19
{****************************************************************}
34
{ REAL should map to single or double }
35
{ so it is not checked, since single }
36
{ double nodes are checked. }
38
{ assumes that enumdef is the same as orddef (same storage format) }
41
{ should be defined depending on CPU target }
48
SMALL_INDEX = 13; { value should not be aligned! }
52
SMALL_INDEX = 13; { value should not be aligned! }
55
RESULT_U16BIT = $500F;
56
RESULT_S32BIT = $500F0000;
57
RESULT_S64BIT = $500F0000;
58
RESULT_S32REAL = 1777.12;
59
RESULT_S64REAL = 3444.24;
63
RESULT_PCHAR = 'Hello world';
64
RESULT_BIGSTRING = 'Hello world';
65
RESULT_SMALLSTRING = 'H';
67
RESULT_BOOLEAN = TRUE;
77
tprocedure = procedure;
80
{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}
82
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
88
tlargerecord = packed record
89
b: array[1..BIG_INDEX] of byte;
92
tsmallarray = packed array[1..SMALL_INDEX] of byte;
97
tsmallset = set of tsmallsetenum;
98
tlargeset = set of char;
100
tsmallstring = string[2];
108
global_u16bit : word;
109
global_s32bit : longint;
110
global_s32real : single;
111
global_s64real : double;
113
global_proc : tprocedure;
114
global_bigstring : shortstring;
115
global_boolean : boolean;
118
global_class : tclass1;
119
global_s64bit : int64;
120
value_s64bit : int64;
121
value_class : tclass1;
125
value_s32bit : longint;
126
value_s32real : single;
127
value_s64real : double;
128
value_proc : tprocedure;
130
value_smallrec : tsmallrecord;
131
value_largerec : tlargerecord;
132
value_smallset : tsmallset;
133
value_smallstring : tsmallstring;
134
value_bigstring : shortstring;
135
value_largeset : tlargeset;
136
value_smallarray : tsmallarray;
137
value_boolean : boolean;
147
procedure clear_globals;
152
global_s32real := 0.0;
153
global_s64real := 0.0;
156
global_bigstring := '';
157
global_boolean := false;
166
procedure clear_values;
171
value_s32real := 0.0;
172
value_s64real := 0.0;
175
fillchar(value_smallrec, sizeof(value_smallrec), #0);
176
fillchar(value_largerec, sizeof(value_largerec), #0);
177
value_smallset := [];
178
value_smallstring := '';
179
value_bigstring := '';
180
value_largeset := [];
181
fillchar(value_smallarray, sizeof(value_smallarray), #0);
182
value_boolean := false;
191
procedure testprocedure;
195
function getu8bit : byte;
197
getu8bit:=RESULT_U8BIT;
200
function getu16bit: word;
202
getu16bit:=RESULT_U16BIT;
205
function gets32bit: longint;
207
gets32bit:=RESULT_S32BIT;
210
function gets64bit: int64;
212
gets64bit:=RESULT_S64BIT;
216
function gets32real: single;
218
gets32real:=RESULT_S32REAL;
221
function gets64real: double;
223
gets64real:=RESULT_S64REAL;
226
{ ***************************************************************** }
228
{ ***************************************************************** }
230
procedure proc_value_u8bit(v: byte);pascal;
236
procedure proc_value_u16bit(v: word);pascal;
242
procedure proc_value_s32bit(v : longint);pascal;
250
procedure proc_value_bool8bit(v: boolean);pascal;
252
{ boolean should be 8-bit always! }
253
if sizeof(boolean) <> 1 then RunError(255);
254
global_u8bit := byte(v);
258
procedure proc_value_bool16bit(v: wordbool);pascal;
260
global_u16bit := word(v);
264
procedure proc_value_bool32bit(v : longbool);pascal;
266
global_s32bit := longint(v);
270
procedure proc_value_s32real(v : single);pascal;
275
procedure proc_value_s64real(v: double);pascal;
281
procedure proc_value_pointerdef(p : pchar);pascal;
287
procedure proc_value_procvardef(p : tprocedure);pascal;
295
procedure proc_value_smallrecord(smallrec : tsmallrecord);pascal;
297
if (smallrec.b = RESULT_U8BIT) and (smallrec.w = RESULT_U16BIT) then
298
global_u8bit := RESULT_U8BIT;
302
procedure proc_value_largerecord(largerec : tlargerecord);pascal;
304
if (largerec.b[1] = RESULT_U8BIT) and (largerec.b[2] = RESULT_U8BIT) then
305
global_u8bit := RESULT_U8BIT;
308
procedure proc_value_smallset(smallset : tsmallset);pascal;
310
if A_D in smallset then
311
global_u8bit := RESULT_U8BIT;
315
procedure proc_value_largeset(largeset : tlargeset);pascal;
317
if 'I' in largeset then
318
global_u8bit := RESULT_U8BIT;
321
procedure proc_value_smallstring(s:tsmallstring);pascal;
323
if s = RESULT_SMALLSTRING then
324
global_u8bit := RESULT_u8BIT;
328
procedure proc_value_bigstring(s:shortstring);pascal;
330
if s = RESULT_BIGSTRING then
331
global_u8bit := RESULT_u8BIT;
335
procedure proc_value_smallarray(arr : tsmallarray);pascal;
337
if arr[SMALL_INDEX] = RESULT_U8BIT then
338
global_u8bit := RESULT_U8BIT;
341
procedure proc_value_smallarray_open(arr : array of byte);pascal;
343
{ form 0 to N-1 indexes in open arrays }
344
if arr[SMALL_INDEX-1] = RESULT_U8BIT then
345
global_u8bit := RESULT_U8BIT;
349
procedure proc_value_classrefdef(obj : tclass1);pascal;
355
procedure proc_value_smallarray_const_1(arr : array of const);pascal;
359
for i:=0 to high(arr) do
362
vtInteger : global_u8bit := arr[i].vinteger and $ff;
363
vtBoolean : global_boolean := arr[i].vboolean;
364
vtChar : global_char := arr[i].vchar;
365
vtExtended : global_s64real := arr[i].VExtended^;
366
vtString : global_bigstring := arr[i].VString^;
368
vtPChar : global_ptr := arr[i].VPchar;
370
{ vtClass : global_class := (arr[i].VClass) as tclass1;}
372
vtInt64 : global_s64bit := arr[i].vInt64^;
380
procedure proc_value_smallarray_const_2(arr : array of const);pascal;
385
global_u8bit := RESULT_U8BIT;
388
procedure proc_value_s64bit(v: int64);pascal;
394
{********************************* MIXED PARAMETERS *************************}
396
procedure proc_value_u8bit_mixed(b1 : byte; v: byte; b2: byte);pascal;
403
procedure proc_value_u16bit_mixed(b1: byte; v: word; b2: byte);pascal;
410
procedure proc_value_s32bit_mixed(b1 : byte; v : longint; b2: byte);pascal;
419
procedure proc_value_bool8bit_mixed(b1: byte; v: boolean; b2: byte);pascal;
421
{ boolean should be 8-bit always! }
422
if sizeof(boolean) <> 1 then RunError(255);
423
global_u8bit := byte(v);
428
procedure proc_value_bool16bit_mixed(b1 : byte; v: wordbool; b2: byte);pascal;
430
global_u16bit := word(v);
435
procedure proc_value_bool32bit_mixed(b1 : byte; v : longbool; b2: byte);pascal;
437
global_s32bit := longint(v);
442
procedure proc_value_s32real_mixed(b1: byte; v : single; b2: byte);pascal;
448
procedure proc_value_s64real_mixed(b1: byte; v: double; b2: byte);pascal;
455
procedure proc_value_pointerdef_mixed(b1: byte; p : pchar; b2: byte);pascal;
462
procedure proc_value_procvardef_mixed(b1: byte; p : tprocedure; b2: byte);pascal;
471
procedure proc_value_smallrecord_mixed(b1: byte; smallrec : tsmallrecord; b2: byte);pascal;
473
if (smallrec.b = RESULT_U8BIT) and (smallrec.w = RESULT_U16BIT) then
474
global_u8bit := RESULT_U8BIT;
479
procedure proc_value_largerecord_mixed(b1: byte; largerec : tlargerecord; b2: byte);pascal;
481
if (largerec.b[1] = RESULT_U8BIT) and (largerec.b[2] = RESULT_U8BIT) then
482
global_u8bit := RESULT_U8BIT;
486
procedure proc_value_smallset_mixed(b1: byte; smallset : tsmallset; b2: byte);pascal;
488
if A_D in smallset then
489
global_u8bit := RESULT_U8BIT;
494
procedure proc_value_largeset_mixed(b1: byte; largeset : tlargeset; b2: byte);pascal;
496
if 'I' in largeset then
497
global_u8bit := RESULT_U8BIT;
501
procedure proc_value_smallstring_mixed(b1: byte; s:tsmallstring; b2: byte);pascal;
503
if s = RESULT_SMALLSTRING then
504
global_u8bit := RESULT_u8BIT;
509
procedure proc_value_bigstring_mixed(b1: byte; s:shortstring; b2: byte);pascal;
511
if s = RESULT_BIGSTRING then
512
global_u8bit := RESULT_u8BIT;
517
procedure proc_value_smallarray_mixed(b1: byte; arr : tsmallarray; b2: byte);pascal;
519
if arr[SMALL_INDEX] = RESULT_U8BIT then
520
global_u8bit := RESULT_U8BIT;
524
procedure proc_value_smallarray_open_mixed(b1: byte; arr : array of byte; b2: byte);pascal;
526
{ form 0 to N-1 indexes in open arrays }
527
if arr[SMALL_INDEX-1] = RESULT_U8BIT then
528
global_u8bit := RESULT_U8BIT;
533
procedure proc_value_classrefdef_mixed(b1: byte; obj : tclass1; b2: byte);pascal;
540
procedure proc_value_s64bit_mixed(b1 : byte; v: int64; b2: byte);pascal;
547
procedure proc_value_smallarray_const_1_mixed(b1: byte; arr : array of const; b2: byte);pascal;
551
for i:=0 to high(arr) do
554
vtInteger : global_u8bit := arr[i].vinteger and $ff;
555
vtBoolean : global_boolean := arr[i].vboolean;
556
vtChar : global_char := arr[i].vchar;
557
vtExtended : global_s64real := arr[i].VExtended^;
558
vtString : global_bigstring := arr[i].VString^;
560
vtPChar : global_ptr := arr[i].VPchar;
562
{ vtClass : global_class := (arr[i].VClass) as tclass1;}
564
vtInt64 : global_s64bit := arr[i].vInt64^;
573
procedure proc_value_smallarray_const_2_mixed(b1: byte; arr : array of const; b2: byte);pascal;
578
global_u8bit := RESULT_U8BIT;
588
{***************************** NORMAL TESTS *******************************}
595
write('Value parameter test (src : LOC_REGISTER)...');
596
proc_value_u8bit(getu8bit);
597
if global_u8bit <> RESULT_U8BIT then
599
proc_value_u16bit(getu16bit);
600
if global_u16bit <> RESULT_U16BIT then
602
proc_value_s32bit(gets32bit);
603
if global_s32bit <> RESULT_S32BIT then
606
proc_value_s64bit(gets64bit);
607
if global_s64bit <> RESULT_S64BIT then
620
write('Value parameter test (src : LOC_FPUREGISTER)...');
621
proc_value_s32real(gets32real);
622
if trunc(global_s32real) <> trunc(RESULT_S32REAL) then
624
proc_value_s64real(gets64real);
625
if trunc(global_s64real) <> trunc(RESULT_S64REAL) then
633
{ LOC_MEM, LOC_REFERENCE orddef }
636
value_u8bit := RESULT_U8BIT;
637
value_u16bit := RESULT_U16BIT;
638
value_s32bit := RESULT_S32BIT;
640
value_s64bit := RESULT_S64BIT;
642
value_s32real := RESULT_S32REAL;
643
value_s64real := RESULT_S64REAL;
648
write('Value parameter test (src : LOC_REFERENCE (orddef/enumdef)))...');
649
proc_value_u8bit(value_u8bit);
650
if global_u8bit <> RESULT_U8BIT then
652
proc_value_u16bit(value_u16bit);
653
if global_u16bit <> RESULT_U16BIT then
655
proc_value_s32bit(value_s32bit);
656
if global_s32bit <> RESULT_S32BIT then
659
proc_value_s64bit(value_s64bit);
660
if global_s64bit <> RESULT_S64BIT then
672
write('Value parameter test (src : LOC_REFERENCE (floatdef))...');
673
proc_value_s32real(value_s32real);
674
if trunc(global_s32real) <> trunc(RESULT_S32REAL) then
676
proc_value_s64real(value_s64real);
677
if trunc(global_s64real) <> trunc(RESULT_S64REAL) then
686
write('Value parameter test (src : LOC_REFERENCE (pointer))...');
690
value_ptr := RESULT_PCHAR;
691
proc_value_pointerdef(value_ptr);
692
if global_ptr <> value_ptr then
696
value_proc := {$ifndef tp}@{$endif}testprocedure;
697
proc_value_procvardef(value_proc);
698
if {$ifndef fpc}@{$endif}value_proc <> {$ifndef fpc}@{$endif}global_proc then
702
value_class := tclass1.create;
703
proc_value_classrefdef(value_class);
704
if value_class <> global_class then
721
write('Value parameter test (src : LOC_FLAGS (orddef)))...');
722
proc_value_bool8bit(value_u8bit = 0);
723
if global_u8bit <> RESULT_BOOL8BIT then
725
{* IMPOSSIBLE TO GENERATE LOC_FLAGS WITH SIZE <> S_B ON VERSION 1.0.x
726
proc_value_bool16bit(value_s64bit < 0);
727
if global_u16bit <> RESULT_BOOL16BIT then
729
proc_value_bool32bit(bool1 and bool2);
730
if global_s32bit <> RESULT_BOOL32BIT then
743
write('Value parameter test (src : LOC_JUMP (orddef)))...');
744
proc_value_bool8bit(value_s64bit = 0);
745
if global_u8bit <> RESULT_BOOL8BIT then
747
{* IMPOSSIBLE TO GENERATE LOC_JUMP WITH SIZE <> S_B ON VERSION 1.0.x
748
proc_value_bool16bit(value_s64bit < 0);
749
if global_u16bit <> RESULT_BOOL16BIT then
751
proc_value_bool32bit(bool1 and bool2);
752
if global_s32bit <> RESULT_BOOL32BIT then
764
setdef : all considered the same by code generator.
766
write('Value parameter test (src : LOC_REFERENCE (recorddef)))...');
771
value_smallrec.b := RESULT_U8BIT;
772
value_smallrec.w := RESULT_U16BIT;
773
proc_value_smallrecord(value_smallrec);
774
if global_u8bit <> RESULT_U8BIT then
779
fillchar(value_largerec,sizeof(value_largerec),RESULT_U8BIT);
780
proc_value_largerecord(value_largerec);
781
if global_u8bit <> RESULT_U8BIT then
791
write('Value parameter test (src : LOC_REFERENCE (setdef)))...');
796
value_smallset := [A_A,A_D];
797
proc_value_smallset(value_smallset);
798
if global_u8bit <> RESULT_U8BIT then
803
value_largeset := ['I'];
804
proc_value_largeset(value_largeset);
805
if global_u8bit <> RESULT_U8BIT then
817
write('Value parameter test (src : LOC_REFERENCE (stringdef)))...');
821
value_smallstring := RESULT_SMALLSTRING;
823
proc_value_smallstring(value_smallstring);
824
if global_u8bit <> RESULT_U8BIT then
829
value_bigstring := RESULT_BIGSTRING;
830
proc_value_bigstring(value_bigstring);
831
if global_u8bit <> RESULT_U8BIT then
841
{ open array by value with cdecl modifier!!!!!!!!!!!!!!!!!!!!!!!!!!!}
842
{ DON'T KNOW WHY/HOW TO TEST!!!!! }
845
write('Value parameter test (src : LOC_REFERENCE (arraydef)))...');
851
fillchar(value_smallarray,sizeof(value_smallarray),#0);
852
value_smallarray[SMALL_INDEX] := RESULT_U8BIT;
853
proc_value_smallarray(value_smallarray);
854
if global_u8bit <> RESULT_U8BIT then
860
fillchar(value_smallarray,sizeof(value_smallarray),#0);
861
value_smallarray[SMALL_INDEX] := RESULT_U8BIT;
862
proc_value_smallarray_open(value_smallarray);
863
if global_u8bit <> RESULT_U8BIT then
870
value_u8bit := RESULT_U8BIT;
871
value_ptr := RESULT_PCHAR;
872
value_s64bit := RESULT_S64BIT;
873
value_smallstring := RESULT_SMALLSTRING;
874
value_class := tclass1.create;
875
value_boolean := RESULT_BOOLEAN;
876
value_char := RESULT_CHAR;
877
value_s64real:=RESULT_S64REAL;
878
proc_value_smallarray_const_1([value_u8bit,value_ptr,value_s64bit,value_char,value_smallstring,value_s64real,
879
value_boolean,value_class]);
881
if global_u8bit <> RESULT_U8BIT then
884
if global_char <> RESULT_CHAR then
886
if global_boolean <> RESULT_BOOLEAN then
888
if trunc(global_s64real) <> trunc(RESULT_S64REAL) then
890
if global_bigstring <> RESULT_SMALLSTRING then
892
if global_ptr <> value_ptr then
894
{ if value_class <> global_class then
895
failed := true;!!!!!!!!!!!!!!!!!!!!}
896
if global_s64bit <> RESULT_S64BIT then
898
if assigned(value_class) then
902
proc_value_smallarray_const_2([]);
903
if global_u8bit <> RESULT_U8BIT then
912
{***************************** MIXED TESTS *******************************}
919
write('Mixed value parameter test (src : LOC_REGISTER)...');
920
proc_value_u8bit_mixed(byte(NOT RESULT_U8BIT),getu8bit,RESULT_U8BIT);
921
if global_u8bit <> RESULT_U8BIT then
923
if value_u8bit <> RESULT_U8BIT then
925
proc_value_u16bit_mixed(byte(NOT RESULT_U8BIT),getu16bit,RESULT_U8BIT);
926
if global_u16bit <> RESULT_U16BIT then
928
if value_u8bit <> RESULT_U8BIT then
930
proc_value_s32bit_mixed(byte(NOT RESULT_U8BIT),gets32bit, RESULT_U8BIT);
931
if global_s32bit <> RESULT_S32BIT then
933
if value_u8bit <> RESULT_U8BIT then
936
proc_value_s64bit_mixed(byte(NOT RESULT_U8BIT),gets64bit,RESULT_U8BIT);
937
if global_s64bit <> RESULT_S64BIT then
940
if value_u8bit <> RESULT_U8BIT then
953
write('Mixed value parameter test (src : LOC_FPUREGISTER)...');
954
proc_value_s32real_mixed(byte(NOT RESULT_U8BIT), gets32real, RESULT_U8BIT);
955
if value_u8bit <> RESULT_U8BIT then
957
if trunc(global_s32real) <> trunc(RESULT_S32REAL) then
959
proc_value_s64real_mixed(byte(NOT RESULT_U8BIT),gets64real,RESULT_U8BIT);
960
if value_u8bit <> RESULT_U8BIT then
962
if trunc(global_s64real) <> trunc(RESULT_S64REAL) then
970
{ LOC_MEM, LOC_REFERENCE orddef }
973
value_u8bit := RESULT_U8BIT;
974
value_u16bit := RESULT_U16BIT;
975
value_s32bit := RESULT_S32BIT;
977
value_s64bit := RESULT_S64BIT;
979
value_s32real := RESULT_S32REAL;
980
value_s64real := RESULT_S64REAL;
985
write('Mixed value parameter test (src : LOC_REFERENCE (orddef/enumdef)))...');
986
proc_value_u8bit_mixed(byte(NOT RESULT_U8BIT),value_u8bit, RESULT_U8BIT);
987
if global_u8bit <> RESULT_U8BIT then
989
if value_u8bit <> RESULT_U8BIT then
991
proc_value_u16bit_mixed(byte(NOT RESULT_U8BIT),value_u16bit, RESULT_U8BIT);
992
if global_u16bit <> RESULT_U16BIT then
994
if value_u8bit <> RESULT_U8BIT then
996
proc_value_s32bit_mixed(byte(NOT RESULT_U8BIT),value_s32bit, RESULT_U8BIT);
997
if global_s32bit <> RESULT_S32BIT then
999
if value_u8bit <> RESULT_U8BIT then
1002
proc_value_s64bit_mixed(byte(NOT RESULT_U8BIT), value_s64bit, RESULT_U8BIT);
1003
if global_s64bit <> RESULT_S64BIT then
1006
if value_u8bit <> RESULT_U8BIT then
1018
write('Mixed value parameter test (src : LOC_REFERENCE (floatdef))...');
1019
proc_value_s32real_mixed(byte(NOT RESULT_U8BIT), value_s32real, RESULT_U8BIT);
1020
if trunc(global_s32real) <> trunc(RESULT_S32REAL) then
1022
if value_u8bit <> RESULT_U8BIT then
1024
proc_value_s64real_mixed(byte(NOT RESULT_U8BIT), value_s64real, RESULT_U8BIT);
1025
if trunc(global_s64real) <> trunc(RESULT_S64REAL) then
1027
if value_u8bit <> RESULT_U8BIT then
1037
write('Mixed value parameter test (src : LOC_REFERENCE (pointer))...');
1041
value_ptr := RESULT_PCHAR;
1042
proc_value_pointerdef_mixed(byte(NOT RESULT_U8BIT), value_ptr, RESULT_U8BIT);
1043
if global_ptr <> value_ptr then
1045
if value_u8bit <> RESULT_U8BIT then
1049
value_proc := {$ifndef tp}@{$endif}testprocedure;
1050
proc_value_procvardef_mixed(byte(NOT RESULT_U8BIT), value_proc, RESULT_U8BIT);
1051
if {$ifndef fpc}@{$endif}value_proc <> {$ifndef fpc}@{$endif}global_proc then
1055
value_class := tclass1.create;
1056
proc_value_classrefdef_mixed(byte(NOT RESULT_U8BIT), value_class, RESULT_U8BIT);
1057
if value_class <> global_class then
1059
if value_u8bit <> RESULT_U8BIT then
1061
value_class.destroy;
1076
write('Mixed value parameter test (src : LOC_FLAGS (orddef)))...');
1077
proc_value_bool8bit_mixed(byte(NOT RESULT_U8BIT), value_u8bit = 0, RESULT_U8BIT);
1078
if global_u8bit <> RESULT_BOOL8BIT then
1080
if value_u8bit <> RESULT_U8BIT then
1082
{* IMPOSSIBLE TO GENERATE LOC_FLAGS WITH SIZE <> S_B ON VERSION 1.0.x
1083
proc_value_bool16bit(value_s64bit < 0);
1084
if global_u16bit <> RESULT_BOOL16BIT then
1086
proc_value_bool32bit(bool1 and bool2);
1087
if global_s32bit <> RESULT_BOOL32BIT then
1100
write('Mixed value parameter test (src : LOC_JUMP (orddef)))...');
1101
proc_value_bool8bit_mixed(byte(NOT RESULT_U8BIT), value_s64bit = 0, RESULT_U8BIT);
1102
if global_u8bit <> RESULT_BOOL8BIT then
1104
if value_u8bit <> RESULT_U8BIT then
1106
{* IMPOSSIBLE TO GENERATE LOC_JUMP WITH SIZE <> S_B ON VERSION 1.0.x
1107
proc_value_bool16bit(value_s64bit < 0);
1108
if global_u16bit <> RESULT_BOOL16BIT then
1110
proc_value_bool32bit(bool1 and bool2);
1111
if global_s32bit <> RESULT_BOOL32BIT then
1123
setdef : all considered the same by code generator.
1125
write('Mixed value parameter test (src : LOC_REFERENCE (recorddef)))...');
1130
value_smallrec.b := RESULT_U8BIT;
1131
value_smallrec.w := RESULT_U16BIT;
1132
proc_value_smallrecord_mixed(byte(NOT RESULT_U8BIT), value_smallrec, RESULT_U8BIT);
1133
if global_u8bit <> RESULT_U8BIT then
1135
if value_u8bit <> RESULT_U8BIT then
1140
fillchar(value_largerec,sizeof(value_largerec),RESULT_U8BIT);
1141
proc_value_largerecord_mixed(byte(NOT RESULT_U8BIT), value_largerec, RESULT_U8BIT);
1142
if global_u8bit <> RESULT_U8BIT then
1144
if value_u8bit <> RESULT_U8BIT then
1154
write('Mixed value parameter test (src : LOC_REFERENCE (setdef)))...');
1159
value_smallset := [A_A,A_D];
1160
proc_value_smallset_mixed(byte(NOT RESULT_U8BIT), value_smallset, RESULT_U8BIT);
1161
if global_u8bit <> RESULT_U8BIT then
1163
if value_u8bit <> RESULT_U8BIT then
1168
value_largeset := ['I'];
1169
proc_value_largeset_mixed(byte(NOT RESULT_U8BIT), value_largeset, RESULT_U8BIT);
1170
if global_u8bit <> RESULT_U8BIT then
1172
if value_u8bit <> RESULT_U8BIT then
1184
write('Mixed value parameter test (src : LOC_REFERENCE (stringdef)))...');
1188
value_smallstring := RESULT_SMALLSTRING;
1190
proc_value_smallstring_mixed(byte(NOT RESULT_U8BIT), value_smallstring, RESULT_U8BIT);
1191
if global_u8bit <> RESULT_U8BIT then
1193
if value_u8bit <> RESULT_U8BIT then
1198
value_bigstring := RESULT_BIGSTRING;
1199
proc_value_bigstring_mixed(byte(NOT RESULT_U8BIT), value_bigstring, RESULT_U8BIT);
1200
if global_u8bit <> RESULT_U8BIT then
1202
if value_u8bit <> RESULT_U8BIT then
1212
{ open array by value with cdecl modifier!!!!!!!!!!!!!!!!!!!!!!!!!!!}
1213
{ DON'T KNOW WHY/HOW TO TEST!!!!! }
1216
write('Mixed value parameter test (src : LOC_REFERENCE (arraydef)))...');
1222
fillchar(value_smallarray,sizeof(value_smallarray),#0);
1223
value_smallarray[SMALL_INDEX] := RESULT_U8BIT;
1224
proc_value_smallarray_mixed(byte(NOT RESULT_U8BIT), value_smallarray, RESULT_U8BIT);
1225
if global_u8bit <> RESULT_U8BIT then
1227
if value_u8bit <> RESULT_U8BIT then
1233
fillchar(value_smallarray,sizeof(value_smallarray),#0);
1234
value_smallarray[SMALL_INDEX] := RESULT_U8BIT;
1235
proc_value_smallarray_open_mixed(byte(NOT RESULT_U8BIT), value_smallarray, RESULT_U8BIT);
1236
if global_u8bit <> RESULT_U8BIT then
1238
if value_u8bit <> RESULT_U8BIT then
1245
value_u8bit := RESULT_U8BIT;
1246
value_ptr := RESULT_PCHAR;
1247
value_s64bit := RESULT_S64BIT;
1248
value_smallstring := RESULT_SMALLSTRING;
1249
value_class := tclass1.create;
1250
value_boolean := RESULT_BOOLEAN;
1251
value_char := RESULT_CHAR;
1252
value_s64real:=RESULT_S64REAL;
1253
proc_value_smallarray_const_1_mixed(byte(NOT RESULT_U8BIT), [value_u8bit,value_ptr,value_s64bit,value_char,
1254
value_smallstring,value_s64real,value_boolean,value_class],
1256
if value_u8bit <> RESULT_U8BIT then
1259
if global_u8bit <> RESULT_U8BIT then
1262
if global_char <> RESULT_CHAR then
1264
if global_boolean <> RESULT_BOOLEAN then
1266
if trunc(global_s64real) <> trunc(RESULT_S64REAL) then
1268
if global_bigstring <> RESULT_SMALLSTRING then
1270
if global_ptr <> value_ptr then
1272
{ if value_class <> global_class then
1273
failed := true;!!!!!!!!!!!!!!!!!!!!}
1274
if global_s64bit <> RESULT_S64BIT then
1276
if assigned(value_class) then
1277
value_class.destroy;
1280
proc_value_smallarray_const_2_mixed(byte(NOT RESULT_U8BIT), [], RESULT_U8BIT);
1281
if global_u8bit <> RESULT_U8BIT then
1283
if value_u8bit <> RESULT_U8BIT then