NEXT_TEST

Ada Test Script Language

Purpose

The NEXT_TEST instruction starts a TEST block that is linked to the previous test block.

Syntax

NEXT_TEST [ LOOP <nb> ]

where:

  1. <nb> is an integer expression strictly greater than 1.

Description

The NEXT_TEST instruction allows you to repeat a series of test contained within a previously defined TEST block.

It contains one more ELEMENT block. It does not contain the FAMILY instruction.

For this new test, a number of iterations can be specified by the keyword LOOP.

The NEXT_TEST instructions can only appear in a TEST ... END TEST block.

The main difference between a NEXT_TEST block and an ELEMENT block is when you use an INIT IN statement within a test block:

  1. If the INIT IN is in a TEST block, there will be a loop over the entire TEST block, without consideration of the ELEMENT blocks that it might contain.

    If the INIT IN is inside a NEXT_TEST block however, the loop will not affect the ELEMENT blocks within other TEST blocks

Example

SERVICE COMPUTE_HISTO

# x1, x2, y1, y2 : integer ;

# histo : T_HISTO ;

TEST 1

FAMILY nominal

ELEMENT

...

END ELEMENT

NEXT_TEST LOOP 2

ELEMENT

Related Topics

TEST | ELEMENT ... END ELEMENT