|
|
DataMuseum.dkPresents historical artifacts from the history of: Bogika Butler |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Bogika Butler Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 7552 (0x1d80)
Types: TextFile
Names: »PRTST.PRN«
└─⟦3576fd675⟧ Bits:30009789/_.ft.Ibm2.50006587.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »PRTST.PRN«
Pro Pascal Compiler - Version zz 2.1
Compilation of: PRTST.PAS
Options: LNIAG
1 0000 SEGMENT Prtest;
2 0000
3 0000 (* This file is part of the ProPascal test option package. Se file
4 0000 PrTst.pas for further explanations of usage
5 0000 *)
6 0000
7 0000 (* Segment PrTest defines constructs for testing ProPascal programs.
8 0000 Constant, Type, and Common variable declarations are included from
9 0000 from files which should be included in segments using the constructs
10 0000 as well. These include files are named as follows:
11 0000
12 0000 Constant declarations: PrTstCon.pas
13 0000 Type declarations: PrTstTyp.pas
14 0000 Common variables declaration: PrTstCom.pas
15 0000 External procedure declarations: PrTstExt.pas
16 0000
17 0000 Based on the above declarations this segment defines and exports one
18 0000 procedure 'testinit' and one function 'test'. Testinit should be called
19 0000 by the main block of the program under test to set up the global data
20 0000 structures declared in 'protstcom.pas'. This should be done as one of the
21 0000 first actions at all. 'Testinit' allows the operator at run time to
22 0000 selectively include or exclude a number of test options in a set.
23 0000 The function 'test' can be called by the blocks being tested with a
24 0000 set of test options as parameter. It will return true or false depending
25 0000 on whether or not the options are present in the global set initialized by
26 0000 'Testinit'. 'Test' can thus be used in a test output macro as in the
27 0000 below example:
28 0000
29 0000 BEGIN
30 0000 IF test( (..) ) THEN
31 0000 BEGIN
32 0000 write(test_out,'= = = = = = ');
33 0000 writeln(test_out);
34 0000 END
35 0000 END;
36 0000
37 0000 The following file including comments may be copied to the relevant
38 0000 source code files. Do not forget to remove the initial blank character!
39 0000
40 0000 *)
41 0000
42 0000 (*---------------------------------------------------------------------------*)
43 0000
44 0000 (* $I A:PrTstCon.pas Declarations of constants for PrTst package *)
45 0000
46 0000 (* $I A:PrTstTyp.pas Declarations of types for PrTst package *)
47 0000
48 0000 (* $I A:PrTstCom.pas Declarations of global variables for PrTst package *)
49 0000
50 0000 (* $I A:PrTstExt.pas Declarations of external procedures for PrTst package *)
51 0000
52 0000 (*---------------------------------------------------------------------------*)
53 0000
54 0000
55 0000
56 0000 (* Inclusion of declarations for THIS segment: *)
57 0000
58 0000 (*$I A:PrTstCon.pas Declarations of constants for PrTst package *)
59 0000 (* $I A:PrTstCon.pas Declarations of constants for PrTst package *)
60 0000
61 0000 (* This file is part of the ProPascal test option package. Se file
62 0000 PrTst.pas for further explanations of usage
63 0000 *)
64 0000
65 0000 CONST
66 0000 max_test_option_number = 15;
67 0000
68 0000
69 0000
70 0000 (*$I A:PrTstTyp.pas Declarations of types for PrTst package *)
71 0000 (* $I A:PrTstTyp.pas Declarations of types for PrTst package *)
72 0000
73 0000 (* This file is part of the ProPascal test option package. Se file
74 0000 PrTst.pas for further explanations of usage
75 0000 *)
76 0000
77 0000 TYPE
78 0000 test_option_type = 0..max_test_option_number;
79 0000 test_option_set_type = SET OF test_option_type;
80 0000
81 0000
82 0000
83 0000 (*$I A:PrTstCom.pas Declarations of global variables for PrTst package *)
84 0000 (* $I A:PrTstCom.pas Declarations of global variables for PrTst package *)
85 0000
86 0000 (* This file is part of the ProPascal test option package. Se file
87 0000 PrTst.pas for further explanations of usage
88 0000 *)
89 0000
90 0000 COMMON
91 0000 test_options: test_option_set_type;
92 0000 test_out: text;
93 0000 test_global: boolean;
94 0000
95 0000
96 0000
97 0000 FUNCTION test(list: test_option_set_type
98 0000 ): boolean;
99 0000
100 0000 BEGIN
101 0000 test := test_global and (list * test_options <> (..) )
102 002D END;
103 003F
104 003F PROCEDURE test_init(VAR in_file,
105 003F out_file: text
106 003F );
107 003F
108 003F CONST
109 003F default_test_out_name = 'CON:';
110 0043
111 0043 VAR
112 0043 i: test_option_type;
113 0043 ch: char;
114 0043 skip: boolean;
115 0043 test_out_name: string(.14.);
116 0043
117 0043 BEGIN
118 0043 test_global := true; (* false *)
119 0055 IF test_global THEN
120 0061 BEGIN
121 0066 write(out_file, 'Enter test output file (default = ',
122 00AB default_test_out_name,
123 00B8 '): '
124 00BE );
125 00CB readln(in_file, test_out_name);
126 00F2 IF length(test_out_name) <= 0 THEN
127 0101 test_out_name := default_test_out_name;
128 0119 assign(test_out, test_out_name);
129 0133 rewrite(test_out);
130 0143 writeln(out_file, '(<CR> = set - = do not set * = skip rest)');
131 019C skip := false;
132 01A5 test_options := (..);
133 01B9 FOR i:= 0 TO max_test_option_number DO
134 01CA IF not skip THEN
135 01D8 BEGIN
136 01DD write(out_file, 'set option ',ord(i),'? >');
137 022F ch := '@';
138 0238 read(in_file,ch);
139 025E IF ch in (.'*','-'.) THEN
140 0277 skip := (ch = '*')
141 0281 ELSE
142 028D test_options := test_options + (.i.);
143 02B9 writeln(out_file);
144 02D2 END
145 02D2 END
146 02DC END;
147 02E2
148 02E2 BEGIN (*PRTEST*)
149 02E2 END.
«eof»