Search in sources :

Example 1 with CorruptDataComparator

use of com.ibm.j9ddr.view.dtfj.comparators.CorruptDataComparator in project openj9 by eclipse.

the class DTFJComparator method assertEqualsIfBothObjectsCorrupt.

// If one object is corrupt then both objects MUST be corrupt and both objects MUST be equal
// Returns true if both objects where corrupt, false otherwise.
private static boolean assertEqualsIfBothObjectsCorrupt(Object a, Object b) {
    if (a instanceof CorruptData && b instanceof CorruptData) {
        CorruptDataComparator comp = new CorruptDataComparator();
        comp.testEquals(b, a, comp.getDefaultMask());
        return true;
    }
    assertFalse("This object should have been corrupt", a instanceof CorruptData);
    assertFalse("This object should have been corrupt", b instanceof CorruptData);
    return false;
}
Also used : CorruptDataComparator(com.ibm.j9ddr.view.dtfj.comparators.CorruptDataComparator) CorruptData(com.ibm.dtfj.image.CorruptData)

Aggregations

CorruptData (com.ibm.dtfj.image.CorruptData)1 CorruptDataComparator (com.ibm.j9ddr.view.dtfj.comparators.CorruptDataComparator)1