Author Login
Post Reply
Author: steve.ebersole@(protected)
Date: 2008-08-18 15:27:15 -0400 (Mon, 18 Aug 2008)
New Revision: 15108
Modified:
core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/junit/UnitTestCase.java
Log:
fixed validation of failure expected results
Modified: core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/junit/UnitTestCase.java
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/junit/UnitTestCase.java 2008-08-18 19:24:24 UTC (rev 15107)
+++ core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/junit/UnitTestCase.java 2008-08-18 19:27:15 UTC (rev 15108)
@@(protected) @@
log.info( "Starting test [" + fullTestName() + "]" );
super.runBare();
if ( doValidate ) {
- fail( "Test marked as FailureExpected, but did not fail!" );
+ throw new FailureExpectedTestPassedException();
}
}
+ catch ( FailureExpectedTestPassedException t ) {
+ throw t;
+ }
catch( Throwable t ) {
if ( doValidate ) {
skipExpectedFailure( t );
@@(protected) @@
}
}
+ private static class FailureExpectedTestPassedException extends Exception {
+ public FailureExpectedTestPassedException() {
+ super( "Test marked as FailureExpected, but did not fail!" );
+ }
+ }
+
protected void skipExpectedFailure(Throwable error) {
reportSkip( "ignoring *FailuredExpected methods", "Failed with: " + error.toString() );
}
_______________________________________________
hibernate-commits mailing list
hibernate-commits@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-commits