OldParserTest.st
changeset 1270 f8848593161c
parent 1269 3eb8c131aefe
--- a/OldParserTest.st	Wed May 15 12:48:20 2002 +0200
+++ b/OldParserTest.st	Wed May 15 12:52:32 2002 +0200
@@ -44,24 +44,7 @@
 
 !OldParserTest methodsFor:'tests'!
 
-test1
-    "Just a demonstration testCase.
-     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
-    "
-!
-
-testSqueakExtensions
+testSqueakExtensions1
      |rslt|
 
      Compiler allowSqueakExtensions:true.
@@ -129,10 +112,47 @@
      self run:#testSqueakExtensions
      self new testSqueakExtensions
     "
+!
+
+testSqueakExtensions2
+    |rslt|
+
+    Compiler allowSqueakExtensions:true.
+    Class withoutUpdatingChangesDo:[
+        self class compile:'
+
+__test
+    ^ {  
+        { 1 factorial }.
+        { 2 factorial }.
+        { 3 factorial }.
+        { 4 factorial }.
+        { 5 factorial }.
+        { 6 factorial }.
+        { 7 factorial }.
+        { 8 factorial }.
+        { 9 factorial }.
+        { 10 factorial }.
+      }
+'.
+    ].
+
+    rslt := self perform:#__test.
+    self assert:( rslt = ( (1 to:10) collect:[:n | (Array with:n factorial)] ) asArray).
+
+    Class withoutUpdatingChangesDo:[
+        self class removeSelector:#__test
+    ].
+    Compiler allowSqueakExtensions:false.
+
+    "
+     self run:#testSqueakExtensions2
+     self new testSqueakExtensions2
+    "
 ! !
 
 !OldParserTest class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/OldParserTest.st,v 1.1 2002-05-15 10:48:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/OldParserTest.st,v 1.2 2002-05-15 10:52:32 cg Exp $'
 ! !