RangeEndpoint one, ComparisonResult expected, RangeEndpoint two)
{
String name = one + " " + expected.describe() + " " + two;
pb.add(name, one, two, expected);
// test reflectivity
final ComparisonResult flippedExpected;
switch (expected) {
case LT: flippedExpected = GT; break;
case LT_BARELY: flippedExpected = GT_BARELY; break;
case GT: flippedExpected = LT; break;
case GT_BARELY: flippedExpected = LT_BARELY; break;
default: flippedExpected = expected; break;
}
String flippedName = two + " " + flippedExpected.describe() + " " + one;
if (!flippedName.equals(name)) { // e.g. we don't need to reflect inclusive("A") == inclusive("A")
pb.add(flippedName, two, one, flippedExpected);
}
}