168 |
168 |
169 performTest |
169 performTest |
170 |
170 |
171 <resource: #skipInDebuggersWalkBack> |
171 <resource: #skipInDebuggersWalkBack> |
172 |
172 |
173 | assertions | |
173 | assertions assumptions | |
174 |
174 |
175 assertions := SignalSet |
175 assertions := SignalSet |
176 with: (Java classForName:'java.lang.AssertionError') |
176 with: (Java classForName:'java.lang.AssertionError') |
177 with: (Java classForName:'junit.framework.AssertionFailedError'). |
177 with: (Java classForName:'junit.framework.AssertionFailedError'). |
178 |
178 assumptions := (Java classForName:'org.junit.internal.AssumptionViolatedException'). |
179 |
179 |
180 "/ JavaVM unimplementedNativeMethodSignal is Signal, not exception. |
180 "/ JavaVM unimplementedNativeMethodSignal is Signal, not exception. |
181 "/ Therefore it MUST be caught here!!!!!! |
181 "/ Therefore it MUST be caught here!!!!!! |
182 [ |
182 [ |
|
183 "This is the tricky part. We have to auto-magically convert |
|
184 JUnit's AssertionFailedError to sUnits TestFailure's. |
|
185 Also, JUnit assumption violations are converted to test skips." |
183 [ |
186 [ |
184 self javaClass new perform: testSelector sunitAsSymbol |
187 self javaClass new perform: testSelector sunitAsSymbol |
185 ] on: assertions do: [:ex| |
188 ] on: assumptions do:[:ex | |
186 "This is the tricky part. We have to auto-magically convert |
189 TestResult skipped sunitSignalWith: ex getMessage |
187 jUnit's AssertionFailedError to sUnits TestFailure's" |
190 ] on: assertions do: [:ex | |
188 TestResult failure sunitSignalWith: ex getMessage |
191 TestResult failure sunitSignalWith: ex getMessage |
189 ] |
192 ] |
190 ] on: JavaVM unimplementedNativeMethodSignal do:[:ex| |
193 ] on: JavaVM unimplementedNativeMethodSignal do:[:ex| |
191 ex class sunitSignalWith: ex description |
194 ex class sunitSignalWith: ex description |
192 ] |
195 ] |
193 |
196 |
194 "Created: / 01-03-2011 / 14:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
197 "Created: / 01-03-2011 / 14:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
195 "Modified: / 12-02-2014 / 12:33:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
198 "Modified: / 03-04-2016 / 10:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
196 ! ! |
199 ! ! |
197 |
200 |
198 !JUnitTestCaseProxy class methodsFor:'documentation'! |
201 !JUnitTestCaseProxy class methodsFor:'documentation'! |
199 |
202 |
200 version_CVS |
203 version_CVS |