VAR, ARRAY, and STR

Ada Test Script Language

Purpose

The VAR, ARRAY, and STR instructions declare the test of a simple variable, a variable array or a variable structure.

Syntax

VAR <variable>, <initialization>, <expected>

ARRAY <variable>, <initialization>, <expected>

STR <variable>, <initialization>, <expected>

where:

Description

Use the VAR, ARRAY, and STR instructions to declare a variable test. During test execution, if the value of the variable is out of the bounds specified in the <expected> expression, the test is Failed.

VAR, ARRAY or STR are synonymous and do not change the way in which the result displayed in the test report.

  • VAR: For simple variables.

  • ARRAY: For variable arrays.

  • STR: For variable structures.

If you use a VAR statement to test an array or structure, the report lists each element of the array or structure.

The VAR, ARRAY, and STR instructions must be located in an ELEMENT or an ENVIRONMENT block.

If a TEST block does not contain a VAR, ARRAY, or STR instruction, it is reported as an empty test. The STUB instruction is not considered as part of the the TEST as STUBs are always tested whether there is a STUB statement present or not.

Related Topics

VAR, ARRAY and STR <variable> Parameter | VAR, ARRAY and STR <initialization> Parameter | VAR, ARRAY and STR <expected> Parameter