Figure 2.6.1.2.2: Equivalence partitioning example
Consider a module that accepts integers in the range 1 to 10 as
input, for example. The input data can be partitioned into five equivalence
classes as shown in Figure 2.6.1.2.2. The five equivalence classes are the
illegal values below the lower boundary, such as 0, the lower boundary value
1, the nominal values 2 to 9, the upper boundary value 10, and the illegal
values above the upper boundary, such as 11.
Output values can be used to generate additional equivalence
classes. In the example above, if the output of the routine generated the
result TRUE for input numbers less than or equal to 5 and FALSE for
numbers greater than 5, the nominal value equivalence class should be split
into two subclasses:
• nominal values giving a TRUE result, such as 3;
• boundary nominal value, i.e. 5;
• nominal values giving a FALSE result, such as 7.