Testing intervals

Component Testing for C

You can test an expected value within a given interval by replacing EV with the keywords MIN and MAX.

You can also use this form on alphanumeric variables, where character strings are considered in alphabetical order ("A"<"B"<"C").

Example

The following example demonstrates how to test a value within an interval:

TEST 4

FAMILY nominal

ELEMENT

VAR a, INIT in {1,2,3}, EV = INIT

VAR b, INIT = 3, EV = INIT

VAR c, INIT = 0, MIN = 4, MAX = 6

#c = add(a,b);

END ELEMENT

END TEST

Related Topics

Testing variables | Testing tolerances | Initializing without testing | Testing expressions | Declaring parameters | Testing arrays | Testing structured variables