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").


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


 FAMILY nominal


 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);



Related Topics

Testing variablesTesting tolerancesInitializing without testingTesting expressionsDeclaring parametersTesting arraysTesting structured variables