Delta define: #ResumableTestFailure as: ( (Class subclassOf: 'TestFailure' instanceVariables: '')) ! (Delta mirrorFor: #ResumableTestFailure) revision: '$Revision:$'! (Delta mirrorFor: #ResumableTestFailure) group: 'SUnit-Preloads'! (Delta mirrorFor: #ResumableTestFailure) comment: 'A ResumableTestFailure triggers a TestFailure, but lets execution of the TestCase continue. this is useful when iterating through collections, and #assert: ing on each element. in combination with methods like testcase>>#assert:description:, this lets you run through a whole collection and note which tests pass. here''''s an example: (1 to: 30) do: [ :each | self assert: each odd description: each printString, '' is even'' resumable: true] for each element where #odd returns , the element will be printed to the Transcript. '! Delta define: #SUnitDelay as: ( (Class subclassOf: 'Delay' instanceVariables: '')) ! (Delta mirrorFor: #SUnitDelay) revision: '$Revision:$'! (Delta mirrorFor: #SUnitDelay) group: 'SUnit-Preloads'! (Delta mirrorFor: #SUnitDelay) comment: ''! Delta define: #SUnitNameResolver as: ( (Class subclassOf: 'Object' instanceVariables: '')) ! (Delta mirrorFor: #SUnitNameResolver) revision: '$Revision:$'! (Delta mirrorFor: #SUnitNameResolver) group: 'SUnit-Preloads'! (Delta mirrorFor: #SUnitNameResolver) comment: ''! Delta define: #TestFailure as: ( (Class subclassOf: 'Exception' instanceVariables: '')) ! (Delta mirrorFor: #TestFailure) revision: '$Revision:$'! (Delta mirrorFor: #TestFailure) group: 'SUnit-Preloads'! (Delta mirrorFor: #TestFailure) comment: 'Signaled in case of a failed test (failure). The test framework distinguishes between failures and errors. A failure is anticipated and checked for with assertions. Errors are unanticipated problems like a division by 0 or an index out of bounds ...'! ! (Delta mirrorFor: #ResumableTestFailure) methodsFor: 'Camp Smalltalk' ! isResumable "Of course a ResumableTestFailure is resumable ;-)" ^true! sunitExitWith: aValue self resume: aValue! ! ! (Delta mirrorFor: #SUnitNameResolver) classSide methodsFor: 'Camp Smalltalk' ! classNamed: aSymbol ^Smalltalk at: aSymbol ifAbsent: [nil].! defaultLogDevice ^ Transcript! errorObject ^Error! mnuExceptionObject ^MessageNotUnderstood! notificationObject ^Notification! ! ! (Delta mirrorFor: #TestFailure) methodsFor: 'Camp Smalltalk' ! defaultAction self halt. "Debugger openContext: initialContext label: messageText contents: initialContext shortStack"! ! ! (Delta mirrorFor: #Behavior) methodsFor: 'Camp Smalltalk' ! allSelectors |selectors| selectors := Set withAll: self selectors. self superclassesDo: [:class| selectors addAll: class selectors]. ^selectors! selectors |selectors| selectors := Set new. (ClassMirror on: self) methodsDo: [:method| selectors add: method selector asString]. ^selectors! sunitAllSelectors ^self allSelectors asSortedCollection asOrderedCollection! sunitSelectors ^self selectors asSortedCollection asOrderedCollection! superclassesDo: block |current| current := self superclassIfAbsent: [^self]. [current = nil] whileFalse: [ block value: current. current := current superclassIfAbsent: [^self]]! ! ! (Delta mirrorFor: #Object) methodsFor: 'Camp Smalltalk' ! sunitAddDependent: anObject self addDependent: anObject! sunitChanged: anAspect self changed: anAspect! sunitRemoveDependent: anObject self removeDependent: anObject! ! ! (Delta mirrorFor: #BlockWithoutArguments) methodsFor: 'Camp Smalltalk' ! sunitEnsure: aBlock ^self ensure: aBlock! sunitOn: anException do: aHandlerBlock ^self on: anException do: aHandlerBlock! ! ! (Delta mirrorFor: #Exception) methodsFor: 'Camp Smalltalk' ! sunitExitWith: aValue self return: aValue! ! ! (Delta mirrorFor: #ReadString) methodsFor: 'Camp Smalltalk' ! sunitAsSymbol ^self asSymbol! sunitMatch: aString ^self match: aString! sunitSubStrings ^self substrings! ! ! (Delta mirrorFor: #Symbol) methodsFor: 'Camp Smalltalk' ! sunitAsClass ^SUnitNameResolver classNamed: self! ! ! (Delta mirrorFor: #Class) methodsFor: 'Camp Smalltalk' ! allSubclasses ^((ClassMirror on: self) subclasses collect: [:mirror| mirror reflectee]) remove: self; yourself! sunitName ^self name! ! ! (Delta mirrorFor: #String) methodsFor: 'Camp Smalltalk' ! sunitAsSymbol ^self asSymbol! sunitMatch: aString ^self match: aString! sunitSubStrings ^self substrings! !