--- a/TestCase.st Tue Sep 04 15:00:59 2001 +0200
+++ b/TestCase.st Tue Sep 04 15:07:08 2001 +0200
@@ -41,7 +41,7 @@
suite
| testSelectors result |
- testSelectors := self sunitSelectors select: [:each | 'test*' sunitMatch: each].
+ testSelectors := self sunitSelectors select: [:each | 'test*' match: each].
testSelectors sort.
result := TestSuite new.
testSelectors do: [:each | result addTest: (self selector: each)].
@@ -171,7 +171,7 @@
to see the failure from the beginning"
"/ self halt.
- self perform: testSelector sunitAsSymbol
+ self perform: testSelector asSymbol
"Modified: / 21.6.2000 / 10:03:37 / Sames"
!
@@ -188,15 +188,15 @@
!
runCase
- self setUp.
- [self perform: testSelector sunitAsSymbol] sunitEnsure: [self tearDown]
+ self setUp.
+ [self perform: testSelector asSymbol] valueNowOrOnUnwindDo: [self tearDown]
"Modified: / 21.6.2000 / 10:04:18 / Sames"
!
runCaseAsFailure
- self setUp.
- [[self openDebuggerOnFailingTestMethod] sunitEnsure: [self tearDown]] fork
+ self setUp.
+ [[self openDebuggerOnFailingTestMethod] valueNowOrOnUnwindDo: [self tearDown]] fork
"Modified: / 21.6.2000 / 10:04:33 / Sames"
!
@@ -210,6 +210,6 @@
!TestCase class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.11 2001-08-23 20:57:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.12 2001-09-04 13:07:08 cg Exp $'
! !
TestCase initialize!
--- a/TestResult.st Tue Sep 04 15:00:59 2001 +0200
+++ b/TestResult.st Tue Sep 04 15:07:08 2001 +0200
@@ -118,12 +118,12 @@
do:
[:signal |
self failures add: aTestCase.
- signal sunitExitWith: nil]]
+ signal returnWith: nil]]
on: self class error
do:
[:signal |
self errors add: aTestCase.
- signal sunitExitWith: nil]
+ signal returnWith: nil]
"Modified: / 21.6.2000 / 10:10:06 / Sames"
! !
@@ -141,5 +141,5 @@
!TestResult class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResult.st,v 1.4 2000-12-14 13:08:21 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResult.st,v 1.5 2001-09-04 13:07:03 cg Exp $'
! !
--- a/TestSuite.st Tue Sep 04 15:00:59 2001 +0200
+++ b/TestSuite.st Tue Sep 04 15:07:08 2001 +0200
@@ -26,15 +26,15 @@
!TestSuite methodsFor:'Dependencies'!
addDependentToHierachy: anObject
- self sunitAddDependent: anObject.
- self tests do: [:each | each addDependentToHierachy: anObject]
+ self addDependent: anObject.
+ self tests do: [:each | each addDependentToHierachy: anObject]
"Modified: / 21.6.2000 / 10:13:35 / Sames"
!
removeDependentFromHierachy: anObject
- self sunitRemoveDependent: anObject.
- self tests do: [:each | each removeDependentFromHierachy: anObject]
+ self removeDependent: anObject.
+ self tests do: [:each | each removeDependentFromHierachy: anObject]
"Modified: / 21.6.2000 / 10:13:27 / Sames"
! !
@@ -49,10 +49,10 @@
!
run: aResult
- self tests do:
- [:each |
- self sunitChanged: each.
- each run: aResult]
+ self tests do:
+ [:each |
+ self changed: each.
+ each run: aResult]
"Modified: / 21.6.2000 / 10:14:01 / Sames"
! !
@@ -60,5 +60,5 @@
!TestSuite class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.3 2000-12-10 13:21:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.4 2001-09-04 13:07:06 cg Exp $'
! !
--- a/TestSuitesScripter.st Tue Sep 04 15:00:59 2001 +0200
+++ b/TestSuitesScripter.st Tue Sep 04 15:07:08 2001 +0200
@@ -39,20 +39,20 @@
!TestSuitesScripter methodsFor:'Private'!
executeSingleSuiteScript: aString
- | useHierachy realName testCase |
- aString last = $*
- ifTrue:
- [realName := aString copyFrom: 1 to: aString size - 1.
- useHierachy := true]
- ifFalse:
- [realName := aString.
- useHierachy := false].
- realName isEmpty ifTrue: [^nil].
- testCase := SUnitNameResolver classNamed: realName sunitAsSymbol.
- testCase isNil ifTrue: [^nil].
- ^useHierachy
- ifTrue: [self hierachyOfTestSuitesFrom: testCase]
- ifFalse: [testCase suite]
+ | useHierachy realName testCase |
+ aString last = $*
+ ifTrue:
+ [realName := aString copyFrom: 1 to: aString size - 1.
+ useHierachy := true]
+ ifFalse:
+ [realName := aString.
+ useHierachy := false].
+ realName isEmpty ifTrue: [^nil].
+ testCase := SUnitNameResolver classNamed: realName asSymbol.
+ testCase isNil ifTrue: [^nil].
+ ^useHierachy
+ ifTrue: [self hierachyOfTestSuitesFrom: testCase]
+ ifFalse: [testCase suite]
"Modified: / 21.6.2000 / 10:16:02 / Sames"
!
@@ -67,11 +67,11 @@
!
hierachyOfTestSuitesFrom: aTestCase
- | subSuite |
- subSuite := TestSuite new.
- subSuite addTest: aTestCase suite.
- aTestCase allSubclasses do: [:each | subSuite addTest: each sunitName sunitAsSymbol sunitAsClass suite].
- ^subSuite
+ | subSuite |
+ subSuite := TestSuite new.
+ subSuite addTest: aTestCase suite.
+ aTestCase allSubclasses do: [:each | subSuite addTest: each name asSymbol sunitAsClass suite].
+ ^subSuite
"Modified: / 21.6.2000 / 10:16:29 / Sames"
!
@@ -96,15 +96,15 @@
!TestSuitesScripter methodsFor:'Scripting'!
run: aString
- | suite subSuite token |
- suite := TestSuite new.
- stream := ReadStream on: aString sunitSubStrings.
- [stream atEnd] whileFalse:
- [token := self getNextToken.
- token notNil ifTrue: [
- subSuite := self executeSingleSuiteScript: token.
- subSuite notNil ifTrue:[suite addTest: subSuite]]].
- ^suite
+ | suite subSuite token |
+ suite := TestSuite new.
+ stream := ReadStream on: aString asArrayOfSubstrings.
+ [stream atEnd] whileFalse:
+ [token := self getNextToken.
+ token notNil ifTrue: [
+ subSuite := self executeSingleSuiteScript: token.
+ subSuite notNil ifTrue:[suite addTest: subSuite]]].
+ ^suite
"Modified: / 21.6.2000 / 10:17:11 / Sames"
!
@@ -116,5 +116,5 @@
!TestSuitesScripter class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuitesScripter.st,v 1.3 2000-12-10 13:21:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuitesScripter.st,v 1.4 2001-09-04 13:06:59 cg Exp $'
! !