| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Hibernate
Revision: 15102
Author: steve.ebersole@jboss.com
Date: 18 Aug 2008 14:57:39
Changes:fixed validation of failure expected results
Files:| ... | ...@@ -62,9 +62,12 @@ | |
| 62 | 62 | log.info( "Starting test [" + fullTestName() + "]" ); |
| 63 | 63 | super.runBare(); |
| 64 | 64 | if ( doValidate ) { |
| 65 | fail( "Test marked as FailureExpected, but did not fail!" ); | |
| 65 | throw new FailureExpectedTestPassedException( "Test marked as FailureExpected, but did not fail!" ); | |
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | catch ( FailureExpectedTestPassedException t ) { | |
| 69 | throw t; | |
| 70 | } | |
| 68 | 71 | catch( Throwable t ) { |
| 69 | 72 | if ( doValidate ) { |
| 70 | 73 | skipExpectedFailure( t ); |
| ... | ...@@ -78,6 +81,12 @@ | |
| 78 | 81 | } |
| 79 | 82 | } |
| 80 | 83 | |
| 84 | private static class FailureExpectedTestPassedException extends Exception { | |
| 85 | public FailureExpectedTestPassedException(String message) { | |
| 86 | super( message ); | |
| 87 | } | |
| 88 | } | |
| 89 | ||
| 81 | 90 | protected void skipExpectedFailure(Throwable error) { |
| 82 | 91 | reportSkip( "ignoring *FailuredExpected methods", "Failed with: " + error.toString() ); |
| 83 | 92 | } |