Testing Intervals
Component Testing for Ada
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 intervals | Testing tolerances | Reporting a variable without testing | Testing expressions