[hibernate-commits] Hibernate SVN: r15108 - core/branches/Branch_3_2_4_SP1_CP/test/org/hibernate/junit.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Mon Aug 18 15:27:15 EDT 2008
Author: steve.ebersole at jboss.com
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)
@@ -33,9 +33,12 @@
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 );
@@ -49,6 +52,12 @@
}
}
+ 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() );
}
More information about the hibernate-commits
mailing list