}
// also check validation passes with asserts disabled
Assert.assertTrue(verifyAlignmentDatasetRefs(al, false, null),
- "Valid test alignment failed when raiseAsserts disabled:"
+ "Valid test alignment tested false when raiseAsserts disabled:"
+ msg);
}
else
{
+ boolean assertRaised = false;
try
{
- Assert.assertFalse(verifyAlignmentDatasetRefs(al, true, null));
- Assert.fail("Invalid test alignment passed but no assertion raised when raiseAsserts enabled:"
- + msg);
+ verifyAlignmentDatasetRefs(al, true, null);
} catch (AssertionError ae)
{
// expected behaviour
+ assertRaised = true;
+ }
+ if (!assertRaised)
+ {
+ Assert.fail("Invalid test alignment passed when raiseAsserts enabled:"
+ + msg);
}
// also check validation passes with asserts disabled
Assert.assertFalse(verifyAlignmentDatasetRefs(al, false, null),
- "Invalid test alignment passed when raiseAsserts disabled:"
+ "Invalid test alignment tested true when raiseAsserts disabled:"
+ msg);
}
}