Relational operator coverage reports whether the situation a==b occurs. If a==b occurs and the program behaves correctly, you can assume the relational operator is not suppose to be <=.
这里不是说了:
if (a < b)
statement;
这样的例子,需要测试边界值 a==b 这种情况能否发生(我认为是指a==b为有效的数据,不会引发异常之类的),如果a==b有效并且程序运行正确(应该是不执行statement吧),就可以假定这个运算符不是<= 。
This measure reports whether boundary situations occur with relational operators (<, <=, >, >=). The hypothesis is that boundary test cases find off-by-one errors and mistaken uses of wrong relational operators such as < instead of <=. For example, consider the following C/C++ code fragment:
if (a < b)
statement;
Relational operator coverage reports whether the situation a==b occurs. If a==b occurs and the program behaves correctly, you can assume the relational operator is not suppose to be <=.
As far as I know, only GCT implements this measure.