# HG changeset patch # User Claus Gittinger # Date 1120860548 -7200 # Node ID 5a049629081c6d3e05c7e9c5de711a595ba64b34 # Parent 6aeeeda25c6931bf883e289aa1b495ec96b8a561 *** empty log message *** diff -r 6aeeeda25c69 -r 5a049629081c 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 " ! !