On page 24 of Squeak by Example it says to run the tests in
CollectionsTest-Text, including a newly-defined method, testShout. In a fresh Squeak 3.9 I get an unexpected assertion failure for StringTest>>#TestIndexOf, which is defined as. testIndexOf "test for http://bugs.impara.de/view.php?id=3574" self assert: ('abc-' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 4. self assert: ('ab7' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 3. self assert: ('a2c' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 2. self assert: ('3bc' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 1. self assert: ('abc' asWideString indexOfAnyOf: (CharacterSet newFrom: ' -0123456789')) = 0. "extension to wide characters" self assert: ((String with: 803 asCharacter with: 811 asCharacter) indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: 812 asCharacter))) = 2. self assert: ('abc' indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: 812 asCharacter))) = 0. self assert: ('abc' indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: $c))) = 3. I don't know how to copy the error messages from the TestFailure window. I have not yet started to learn the debugger, so I am at a lost to find out more. Any suggestions? _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On 12-08-25 4:51 PM, Edward Mokurai Cherlin wrote:
> On page 24 of Squeak by Example it says to run the tests in > CollectionsTest-Text, including a newly-defined method, testShout. In a fresh > Squeak 3.9 I get an unexpected assertion failure for StringTest>>#TestIndexOf, > which is defined as. > > testIndexOf > > "test for http://bugs.impara.de/view.php?id=3574" > self assert: ('abc-' asWideString indexOfAnyOf: (CharacterSet newFrom: ' > -0123456789')) = 4. > self assert: ('ab7' asWideString indexOfAnyOf: (CharacterSet newFrom: ' > -0123456789')) = 3. > self assert: ('a2c' asWideString indexOfAnyOf: (CharacterSet newFrom: ' > -0123456789')) = 2. > self assert: ('3bc' asWideString indexOfAnyOf: (CharacterSet newFrom: ' > -0123456789')) = 1. > self assert: ('abc' asWideString indexOfAnyOf: (CharacterSet newFrom: ' > -0123456789')) = 0. > > "extension to wide characters" > self assert: ((String with: 803 asCharacter with: 811 asCharacter) > indexOfAnyOf: (CharacterSet newFrom: (String with: 811 asCharacter with: 812 > asCharacter))) = 2. > > self assert: ('abc' indexOfAnyOf: (CharacterSet newFrom: (String with: 811 > asCharacter with: 812 asCharacter))) = 0. > > self assert: ('abc' indexOfAnyOf: (CharacterSet newFrom: (String with: 811 > asCharacter with: $c))) = 3. > > > I don't know how to copy the error messages from the TestFailure window. I have > not yet started to learn the debugger, so I am at a lost to find out more. > > Any suggestions? > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners Debugger. That should make it clearer. Chris _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |