-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extensions to TestResult. Thanks Mike.
- Loading branch information
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
CoreUpdates/6863-SUnit-Extensions-MichaelRueger-2024Nov27-17h59m-mir.001.cs.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
'From Cuis7.1 [latest update: #6862] on 27 November 2024 at 6:13:57 pm'! | ||
|
||
!TestCase methodsFor: 'testing' stamp: 'JF 7/30/2003 13:39'! | ||
shouldPass | ||
"Unless the selector is in the list we get from #expectedFailures, we expect it to pass" | ||
^ (self expectedFailures includes: testSelector) not! ! | ||
|
||
|
||
!TestResult methodsFor: 'accessing' stamp: 'mir 11/21/2024 15:57:47'! | ||
allFailures | ||
^ self unexpectedFailures, self unexpectedPasses ! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'mir 11/21/2024 15:28:39'! | ||
allPassed | ||
^ self expectedPasses, self expectedDefects! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'! | ||
expectedDefectCount | ||
^ self expectedDefects size! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'md 11/25/2004 16:36'! | ||
expectedDefects | ||
^ (errors, failures asOrderedCollection) select: [:each | each shouldPass not] ! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'! | ||
expectedPassCount | ||
^ self expectedPasses size! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 16:14'! | ||
expectedPasses | ||
^ passed select: [:each | each shouldPass] ! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'! | ||
unexpectedErrorCount | ||
^ self unexpectedErrors size! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 16:14'! | ||
unexpectedErrors | ||
^ errors select: [:each | each shouldPass] ! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'! | ||
unexpectedFailureCount | ||
^ self unexpectedFailures size! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 16:14'! | ||
unexpectedFailures | ||
^ failures select: [:each | each shouldPass] ! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 13:54'! | ||
unexpectedPassCount | ||
^ self unexpectedPasses size! ! | ||
|
||
!TestResult methodsFor: 'accessing' stamp: 'JF 7/30/2003 16:14'! | ||
unexpectedPasses | ||
^ passed select: [:each | each shouldPass not] ! ! | ||
|
||
|
||
!TestCase methodsFor: 'running' stamp: 'mir 11/21/2024 15:52:57'! | ||
run: aResult skipExpectedFailures: aBoolean | ||
ChangeSet | ||
runningTest: self printString | ||
do: [ aResult runCase: self ].! ! | ||
|
||
|
||
!TestResult methodsFor: 'printing' stamp: 'jmv 11/27/2024 18:12:40'! | ||
printOn: aStream | ||
aStream | ||
nextPutAll: self runCount printString; | ||
nextPutAll: ' run, '; | ||
nextPutAll: self expectedPassCount printString; | ||
nextPutAll: ' passes, '; | ||
nextPutAll: self expectedDefectCount printString; | ||
nextPutAll:' expected failures/errors, '; | ||
nextPutAll: self unexpectedFailureCount printString; | ||
nextPutAll: ' failures, '; | ||
nextPutAll: self unexpectedErrorCount printString; | ||
nextPutAll:' errors, '; | ||
nextPutAll: self unexpectedPassCount printString; | ||
nextPutAll:' unexpected passes'.! ! | ||
|