|
|
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: 3968 (0xf80)
Types: TextFile
Names: »PRTSTBT.BAK«
└─⟦89ce9b901⟧ Bits:30009789/_.ft.Ibm2.50007362.imd Mogens Pelles Zilog 80,000 / EOS projekt
└─⟦this⟧ »PRTSTBT.BAK«
SEGMENT Prtest;
(* This file is part of the ProPascal test option package. Se file
PrTst.pas for further explanations of usage
*)
(* Segment PrTest defines constructs for testing ProPascal programs.
Constant, Type, and Common variable declarations are included from
from files which should be included in segments using the constructs
as well. These include files are named as follows:
Constant declarations: PrTstCon.pas
Type declarations: PrTstTyp.pas
Common variables declaration: PrTstCom.pas
External procedure declarations: PrTstExt.pas
Based on the above declarations this segment defines and exports one
procedure 'testinit' and one function 'test'. Testinit should be called
by the main block of the program under test to set up the global data
structures declared in 'protstcom.pas'. This should be done as one of the
first actions at all. 'Testinit' allows the operator at run time to
selectively include or exclude a number of test options in a set.
The function 'test' can be called by the blocks being tested with a
set of test options as parameter. It will return true or false depending
on whether or not the options are present in the global set initialized by
'Testinit'. 'Test' can thus be used in a test output macro as in the
below example:
BEGIN
IF test( (..) ) THEN
BEGIN
write(test_out,'= = = = = = ');
writeln(test_out);
END
END;
The following file including comments may be copied to the relevant
source code files. Do not forget to remove the initial blank character!
*)
(*---------------------------------------------------------------------------*)
(* $I A:PrTstCon.pas Declarations of constants for PrTst package *)
(* $I A:PrTstTyp.pas Declarations of types for PrTst package *)
(* $I A:PrTstCom.pas Declarations of global variables for PrTst package *)
(* $I A:PrTstExt.pas Declarations of external procedures for PrTst package *)
(*---------------------------------------------------------------------------*)
(* Inclusion of declarations for THIS segment: *)
CONST
(*$I A:PrTstCon.pas Declarations of constants for PrTst package *)
TYPE
(*$I A:PrTstTyp.pas Declarations of types for PrTst package *)
COMMON
(*$I A:PrTstCom.pas Declarations of global variables for PrTst package *)
FUNCTION test(list: test_option_set_type
): boolean;
BEGIN
test := test_global and (list * test_options <> (..) )
END;
PROCEDURE test_init(VAR in_file,
out_file: text
);
CONST
default_test_out_name = 'CON:';
VAR
N: test_option_type;
test_out_name: string(.14.);
comment: string(.128.);
test_in: text;
BEGIN
test_global := true; (* false *)
IF test_global THEN
BEGIN
assign(test_in, 'IN.TST');
resret(test_in);
readln(test_in, test_out_name);
IF length(test_out_name) <= 0 THEN
test_out_name := default_test_out_name;
assign(test_out, test_out_name);
rewrite(test_out);
test_options := (..);
WHILE not eoln(test_in) DO
BEGIN
read(test_in, N);
IF (0 <= N) and (N <= max_test_option_number) THEN
test_options := test_options + (.N.);
END;
readln(test_in);
readln(test_in, comment);
writeln(out_file);
writeln(test_out); writeln(test_out); writeln(test_out);
writeln(test_out, comment);
writeln(test_out)
END
END;
BEGIN (*PRTEST*)
END. (*PRTEST*)
«eof»