A new version of SUnit was added to project The Inbox: http://source.squeak.org/inbox/SUnit-spd.82.mcz
==================== Summary ====================
Name: SUnit-spd.82 Author: spd Time: 1 October 2010, 10:31:26.892 am UUID: 6332b14d-4ac9-4fdb-bffb-8e225050f415 Ancestors: SUnit-nice.81
* TestCase now uses class>>suiteClass instead of referencing the class name directly * TestSuite now uses #resultClass instead of referencing the class name directly * merged 'Accessing' protocol into 'accessing'
=============== Diff against SUnit-nice.81 ===============
Item was changed: ----- Method: TestCase class>>buildSuite (in category 'building suites') ----- buildSuite | suite | + suite := self suiteClass new. - suite := TestSuite new. ^ self isAbstract ifTrue: [ suite name: self name asString. self allSubclasses do: [:each | each isAbstract ifFalse: [each addToSuiteFromSelectors: suite]]. suite] ifFalse: [self addToSuiteFromSelectors: suite]!
Item was changed: ----- Method: TestCase class>>buildSuiteFromMethods: (in category 'building suites') ----- buildSuiteFromMethods: testMethods | suite | + suite := (self suiteClass new) - suite := (TestSuite new) name: self name asString; yourself. ^self addToSuite: suite fromMethods: testMethods!
Item was changed: + ----- Method: TestSuite>>resources (in category 'accessing') ----- - ----- Method: TestSuite>>resources (in category 'Accessing') ----- resources ^ resources ifNil: [resources := self defaultResources] !
Item was added: + ----- Method: TestSuite>>resultClass (in category 'private') ----- + resultClass + + ^ TestResult.!
Item was changed: ----- Method: TestSuite>>run (in category 'running') ----- run | result | + result := self resultClass new. - result := TestResult new. self resources do: [ :res | res isAvailable ifFalse: [^res signalInitializationError]]. [self run: result] ensure: [self resources do: [:each | each reset]]. ^result !
Item was changed: + ----- Method: TestSuite>>tests (in category 'accessing') ----- - ----- Method: TestSuite>>tests (in category 'Accessing') ----- tests ^ tests ifNil: [tests := OrderedCollection new] !
squeak-dev@lists.squeakfoundation.org