--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/RegressionTests__DebuggerTest.st Tue Nov 11 19:46:37 2003 +0100
@@ -0,0 +1,142 @@
+"{ Package: 'exept:regression' }"
+
+"{ NameSpace: RegressionTests }"
+
+TestCase subclass:#DebuggerTest
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'tests-Regression'
+!
+
+!DebuggerTest class methodsFor:'documentation'!
+
+documentation
+"
+ documentation to be added.
+
+ [author:]
+ Claus Gittinger (cg@alan)
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+!
+
+history
+ "Created: / 11.11.2003 / 17:21:55 / cg"
+! !
+
+!DebuggerTest methodsFor:'tests'!
+
+test1
+ "This is a demonstration testCase - it is meant to be removed eventually.
+ This testCase will PASS.
+ Double click on the TestCase class or open a TestRunner to see me checking...
+ - please add more methods like this..."
+
+ |o|
+
+ o := Array new:2.
+ self assert: ( o size == 2 ).
+ self should: [ o at:0 ] raise:Error.
+ self shouldnt: [ o at:1 ] raise:Error.
+
+ "
+ self run:#test1
+ self new test1
+ "
+!
+
+test2
+ "This is a demonstration testCase - it is meant to be removed eventually..
+ This testCase WILL FAIL.
+ Double click on the TestCase class or open a TestRunner to see me checking...
+ - please add more methods like this..."
+
+ |o|
+
+ o := Array new:2.
+ self assert: ( o size == 3 ).
+
+ "
+ self run:#test2
+ self new test2
+ "
+!
+
+test3
+ "This is a demonstration testCase - it is meant to be removed eventually..
+ This testCase WILL generate an ERROR.
+ Double click on the TestCase class or open a TestRunner to see me checking...
+ - please add more methods like this..."
+
+ |o|
+
+ o := Array new:2.
+ self assert: ( o foo ).
+
+ "
+ self run:#test3
+ self new test3
+ "
+!
+
+testBlockVars_01
+ |a b|
+
+ a := #( 1 2 3 4 ).
+ b := #( 9 8 7 6 ).
+ a do:[:eachA |
+ b do:[:eachB |
+ " you should see both eachA and eachB in the debugger "
+ " eachA must be 1
+ eachB must be 9
+ "
+ self halt:'check variables in the debugger'
+ ]
+ ]
+
+ "
+ self run:#testBlockVars_01
+ self new testBlockVars_01
+ "
+!
+
+testBlockVars_02
+ |a b|
+
+ a := #( 1 2 3 4 ).
+ b := #( 9 8 7 6 ).
+ a do:[:eachA |
+ |outer|
+
+ outer := eachA + 1.
+ b do:[:eachB |
+ |inner|
+
+ inner := eachB + 1.
+
+ " you should see both eachA and eachB and outer and inner in the debugger "
+ " eachA must be 1 ; outer must be 2
+ eachB must be 9 ; inner must be 10.
+ "
+ self halt:'check variables in the debugger'
+ ]
+ ]
+
+ "
+ self run:#testBlockVars_02
+ self new testBlockVars_02
+ "
+! !
+
+!DebuggerTest class methodsFor:'documentation'!
+
+version
+ ^ '$Header$'
+! !