Andreas Raab uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-ar.91.mcz ==================== Summary ==================== Name: CollectionsTests-ar.91 Author: ar Time: 27 August 2009, 8:45:06 am UUID: 43f0d9ce-524e-934a-832a-3b6a00ee57e2 Ancestors: CollectionsTests-rkrk.90 Tests for String>>asDecomposedUnicode and String>>asPrecomposedUnicode. =============== Diff against CollectionsTests-rkrk.90 =============== Item was added: + ----- Method: StringTest>>testAsPrecomposedUnicode (in category 'tests - converting') ----- + testAsPrecomposedUnicode + "Test the behavior of #asPrecomposedUnicode" + | composed decomposed | + + "Tests single character" + composed := String with: (Character value: 353). + decomposed := String with: (Character value: 115) with: (Character value: 780). + self assert: decomposed asPrecomposedUnicode = composed. + + "Test character at end of text" + composed := 'Hello', (String with: (Character value: 353)). + decomposed := 'Hello', (String with: (Character value: 115) with: (Character value: 780)). + self assert: decomposed asPrecomposedUnicode = composed. + + "Test character in the midst of text" + composed := 'Hello', (String with: (Character value: 353)), 'World'. + decomposed := 'Hello', (String with: (Character value: 115) with: (Character value: 780)), 'World'. + self assert: decomposed asPrecomposedUnicode = composed. + + "Test character in the end of text" + composed := (String with: (Character value: 353)), 'World'. + decomposed := (String with: (Character value: 115) with: (Character value: 780)), 'World'. + self assert: decomposed asPrecomposedUnicode = composed. + + "Test string full of characters" + "Test character in the end of text" + composed := (String with: (Character value: 353)). + decomposed := (String with: (Character value: 115) with: (Character value: 780)). + self assert: (decomposed, decomposed, decomposed) asPrecomposedUnicode = (composed, composed, composed). + ! Item was added: + ----- Method: StringTest>>testAsDecomposedUnicode (in category 'tests - converting') ----- + testAsDecomposedUnicode + "Test the behavior of #asDecomposedUnicode" + | composed decomposed | + + "Tests single character" + composed := String with: (Character value: 353). + decomposed := String with: (Character value: 115) with: (Character value: 780). + self assert: composed asDecomposedUnicode = decomposed. + + "Test character at end of text" + composed := 'Hello', (String with: (Character value: 353)). + decomposed := 'Hello', (String with: (Character value: 115) with: (Character value: 780)). + self assert: composed asDecomposedUnicode = decomposed. + + "Test character in the midst of text" + composed := 'Hello', (String with: (Character value: 353)), 'World'. + decomposed := 'Hello', (String with: (Character value: 115) with: (Character value: 780)), 'World'. + self assert: composed asDecomposedUnicode = decomposed. + + "Test character in the end of text" + composed := (String with: (Character value: 353)), 'World'. + decomposed := (String with: (Character value: 115) with: (Character value: 780)), 'World'. + self assert: composed asDecomposedUnicode = decomposed. + + "Test string full of characters" + "Test character in the end of text" + composed := (String with: (Character value: 353)). + decomposed := (String with: (Character value: 115) with: (Character value: 780)). + self assert: (composed, composed, composed) asDecomposedUnicode = (decomposed, decomposed, decomposed). + ! |
Free forum by Nabble | Edit this page |