--- a/TestResult.st Thu Dec 13 22:47:44 2001 +0100
+++ b/TestResult.st Thu Dec 13 22:51:02 2001 +0100
@@ -1,7 +1,7 @@
"{ Package: 'stx:goodies/sunit' }"
Object subclass:#TestResult
- instanceVariableNames:'runCount failures errors'
+ instanceVariableNames:'runCount passed failures errors'
classVariableNames:''
poolDictionaries:''
category:'SUnit-Base'
@@ -141,5 +141,5 @@
!TestResult class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResult.st,v 1.6 2001-09-04 19:03:35 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResult.st,v 1.7 2001-12-13 21:50:16 cg Exp $'
! !
--- a/TestSuite.st Thu Dec 13 22:47:44 2001 +0100
+++ b/TestSuite.st Thu Dec 13 22:51:02 2001 +0100
@@ -1,7 +1,7 @@
"{ Package: 'stx:goodies/sunit' }"
Object subclass:#TestSuite
- instanceVariableNames:'name tests'
+ instanceVariableNames:'name tests resources'
classVariableNames:''
poolDictionaries:''
category:'SUnit-Base'
@@ -18,6 +18,16 @@
aCollection do: [:eachTest | self addTest: eachTest]
!
+defaultResources
+ ^self tests
+ inject: Set new
+ into:
+ [:coll :testCase |
+ coll
+ addAll: testCase resources;
+ yourself]
+!
+
name
^ name ? 'a TestSuite'.
!
@@ -26,6 +36,15 @@
name := aString
!
+resources
+ resources isNil ifTrue: [resources := self defaultResources].
+ ^resources
+!
+
+resources: anObject
+ resources := anObject
+!
+
tests
tests isNil ifTrue: [tests := OrderedCollection new].
^tests
@@ -79,5 +98,5 @@
!TestSuite class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.6 2001-12-04 09:06:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.7 2001-12-13 21:50:09 cg Exp $'
! !
--- a/abbrev.stc Thu Dec 13 22:47:44 2001 +0100
+++ b/abbrev.stc Thu Dec 13 22:51:02 2001 +0100
@@ -1,4 +1,5 @@
ExampleSetTest ExampleSetTest stx:goodies/sunit 'SUnit-Tests'
+ExampleTestResource ExampleTestResource stx:goodies/sunit 'SUnit-Tests'
SUnitDelay SUnitDelay stx:goodies/sunit 'SUnit-Preload'
SUnitNameResolver SUnitNameResolver stx:goodies/sunit 'SUnit-Preload'
SUnitTest SUnitTest stx:goodies/sunit 'SUnit-Tests'