FORMAT
System Testing Test Script Language.
Syntax
FORMAT <variable> = <format>
FORMAT <type> = <format>
FORMAT <field> = <format>
Description
This FORMAT instruction modifies the way a variable, type, or field of a structure is tested and printed. All formats of the same type is modified.
The new format is defined in C.
A format can also specify a print mode in binary or hexadecimal, using the options #B and #H.
The FORMAT instruction is optional. You may use it at the beginning of the test script or in a block of instructions, depending on the required scope. However, FORMAT statements that apply to data contained in a CALLBACK or PROCSEND block must be located before:
-
any CALLBACK or PROCSEND block
any PROC statements that contain DEF_MESSAGE or SEND instructions
Example
SCENARIO first
#char buffer[100];
#typedef struct {
# int ax_register;
# int bx_register;
# int cx_register;
#} 8088_register_t;
FORMAT buffer = unsigned char[50]
FORMAT 8088_register_t.ax_register = #B
FORMAT 8088_register_t.bx_register = #H
END SCENARIO