'From Squeak3.8alpha of ''17 July 2004'' [latest update: #6261] on 25 September 2004 at 3:15:38 pm'! "Change Set: SUnitExtensions Date: 25 September 2004 Author: Stephane ducasse Only contain the extensions of Sunit for long tests."! TestCase subclass: #LongTestCase instanceVariableNames: '' classVariableNames: 'DoNotRunLongTestCases' poolDictionaries: '' category: 'SUnit-Extensions'! TestCase subclass: #LongTestCaseTest instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'SUnit-Extensions'! LongTestCase subclass: #LongTestCaseTestUnderTest instanceVariableNames: '' classVariableNames: 'RunStatus' poolDictionaries: '' category: 'SUnit-Extensions'! !LongTestCase class methodsFor: 'accessing' stamp: 'sd 9/25/2004 12:57'! doNotRunLongTestCases DoNotRunLongTestCases := true.! ! !LongTestCase class methodsFor: 'accessing' stamp: 'sd 9/25/2004 12:57'! runLongTestCases DoNotRunLongTestCases := false.! ! !LongTestCase class methodsFor: 'class initialization' stamp: 'sd 9/25/2004 12:57'! initialize self doNotRunLongTestCases! ! !LongTestCase class methodsFor: 'instance creation' stamp: 'sd 9/25/2004 14:12'! suite ^ DoNotRunLongTestCases ifTrue: [ self suiteClass new] ifFalse: [super suite] ! ! !LongTestCaseTest methodsFor: 'testing' stamp: 'sd 9/25/2004 14:12'! testLongTestCaseDoNotRun "self debug: #testLongTestCaseDoNotRun" "self run: #testLongTestCaseDoNotRun" LongTestCase doNotRunLongTestCases. LongTestCaseTestUnderTest markAsNotRun. self deny: LongTestCaseTestUnderTest hasRun. LongTestCaseTestUnderTest suite run. self deny: LongTestCaseTestUnderTest hasRun. ! ! !LongTestCaseTest methodsFor: 'testing' stamp: 'sd 9/25/2004 14:12'! testLongTestCaseRun "self debug: #testLongTestCaseRun" "self run: #testLongTestCaseRun" LongTestCase runLongTestCases. LongTestCaseTestUnderTest markAsNotRun. self deny: LongTestCaseTestUnderTest hasRun. LongTestCaseTestUnderTest suite run. self assert: LongTestCaseTestUnderTest hasRun. ! ! !LongTestCaseTestUnderTest methodsFor: 'testing' stamp: 'sd 9/25/2004 13:59'! testWhenRunMarkTestedToTrue RunStatus := true! ! !LongTestCaseTestUnderTest class methodsFor: 'Accessing' stamp: 'sd 9/25/2004 14:02'! hasRun ^ RunStatus! ! !LongTestCaseTestUnderTest class methodsFor: 'Accessing' stamp: 'sd 9/25/2004 13:59'! markAsNotRun ^ RunStatus := false! ! LongTestCaseTestUnderTest class removeSelector: #hasRunStatus! LongTestCaseTestUnderTest class removeSelector: #runStatus! LongTestCaseTestUnderTest class removeSelector: #tested! LongTestCaseTestUnderTest class removeSelector: #testedStatus! !LongTestCaseTestUnderTest class reorganize! ('Accessing' hasRun markAsNotRun) ! !LongTestCaseTestUnderTest reorganize! ('testing' testWhenRunMarkTestedToTrue) ! !LongTestCaseTest reorganize! ('testing' testLongTestCaseDoNotRun testLongTestCaseRun) ! LongTestCase class removeSelector: #doesNotRunLongTestCases! LongTestCase initialize! !LongTestCase class reorganize! ('accessing' doNotRunLongTestCases runLongTestCases) ('class initialization' initialize) ('instance creation' suite) !