|
|
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: 7936 (0x1f00)
Types: TextFile
Names: »PRTST.PRN«
└─⟦cac67a5ae⟧ Bits:30009789/_.ft.Ibm2.50007338.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 CONST
59 0000 (*$I A:PrTstCon.pas Declarations of constants for PrTst package *)
60 0000 (* $I A:PrTstCon.pas Declarations of constants for PrTst package *)
61 0000
62 0000 (* This file is part of the ProPascal test option package. Se file
63 0000 PrTst.pas for further explanations of usage
64 0000 *)
65 0000
66 0000 max_test_option_number = 15;
67 0000
68 0000
69 0000
70 0000 TYPE
71 0000 (*$I A:PrTstTyp.pas Declarations of types for PrTst package *)
72 0000 (* $I A:PrTstTyp.pas Declarations of types for PrTst package *)
73 0000
74 0000 (* This file is part of the ProPascal test option package. Se file
75 0000 PrTst.pas for further explanations of usage
76 0000 *)
77 0000
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 COMMON
84 0000 (*$I A:PrTstCom.pas Declarations of global variables for PrTst package *)
85 0000 (* $I A:PrTstCom.pas Declarations of global variables for PrTst package *)
86 0000
87 0000 (* This file is part of the ProPascal test option package. Se file
88 0000 PrTst.pas for further explanations of usage
89 0000 *)
90 0000
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 comment: string(.128.);
117 0043
118 0043 BEGIN
119 0043 test_global := true; (* false *)
120 0055 IF test_global THEN
121 0061 BEGIN
122 0066 write(out_file, 'Enter test output file (default = ',
123 00AB default_test_out_name,
124 00B8 '): '
125 00BE );
126 00CB readln(in_file, test_out_name);
127 00F2 IF length(test_out_name) <= 0 THEN
128 0101 test_out_name := default_test_out_name;
129 0119 assign(test_out, test_out_name);
130 0133 rewrite(test_out);
131 0143 writeln(out_file, '(<CR> = set - = do not set * = skip rest)');
132 019C skip := false;
133 01A5 test_options := (..);
134 01B9 FOR i:= 0 TO max_test_option_number DO
135 01CA IF not skip THEN
136 01D8 BEGIN
137 01DD write(out_file, 'set option ',ord(i),'? >');
138 022F ch := '@';
139 0238 read(in_file,ch);
140 025E IF ch in (.'*','-'.) THEN
141 0277 skip := (ch = '*')
142 0281 ELSE
143 028D test_options := test_options + (.i.);
144 02B9 writeln(out_file);
145 02D2 END;
146 02DC write(out_file, 'Enter heading:');
147 0310 readln(in_file, comment);
148 0337 readln(in_file, comment);
149 035E writeln(out_file);
150 0377 writeln(test_out); writeln(test_out); writeln(test_out);
151 03A3 writeln(test_out, comment);
152 03C5 writeln(test_out)
153 03D4 END
154 03D7 END;
155 03DD
156 03DD BEGIN (*PRTEST*)
157 03DD END.
«eof»