*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Sat, 09 Jul 2005 00:09:08 +0200
changeset 284 5a049629081c
parent 283 6aeeeda25c69
child 285 11e1200a3625
*** empty log message ***
RegressionTests__StringTests.st
--- a/RegressionTests__StringTests.st	Fri Jul 08 23:00:21 2005 +0200
+++ b/RegressionTests__StringTests.st	Sat Jul 09 00:09:08 2005 +0200
@@ -12,7 +12,55 @@
 
 !StringTests methodsFor:'tests'!
 
-test01Contains8BitCharacters
+test01_access
+    0 to:33 do:[:l |
+        |str|
+
+        str := String new:l.
+        str atAllPut:(Character space).
+        self assert:( str isBlank ).
+
+        1 to:l do:[:pos |
+            str at:pos put:$a.
+            self assert:( str isBlank not ).
+            str at:pos put:(Character space).
+        ].
+    ].
+
+    "
+     self new test01_access
+    "
+!
+
+test02_subclassAccess
+    |myStringClass str|
+
+    Class withoutUpdatingChangesDo:[
+        myStringClass := String 
+                        subclass:#'MyString'
+                        instanceVariableNames:'foo'
+                        classVariableNames:''
+                        poolDictionaries:nil.
+    ].
+
+    0 to:33 do:[:l |
+        str := myStringClass new:l.
+        str atAllPut:(Character space).
+        self assert:( str isBlank ).
+
+        1 to:l do:[:pos |
+            str at:pos put:$a.
+            self assert:( str isBlank not ).
+            str at:pos put:(Character space).
+        ].
+    ].
+
+    "
+     self new test02_subclassAccess
+    "
+!
+
+test10_Contains8BitCharacters
     0 to:33 do:[:l |
         |str|
 
@@ -28,7 +76,7 @@
     ].
 
     "
-     self new test01Contains8BitCharacters
+     self new test10_Contains8BitCharacters
     "
 ! !