equal
deleted
inserted
replaced
10 ! |
10 ! |
11 |
11 |
12 |
12 |
13 !StringTests methodsFor:'tests'! |
13 !StringTests methodsFor:'tests'! |
14 |
14 |
15 test01Contains8BitCharacters |
15 test01_access |
|
16 0 to:33 do:[:l | |
|
17 |str| |
|
18 |
|
19 str := String new:l. |
|
20 str atAllPut:(Character space). |
|
21 self assert:( str isBlank ). |
|
22 |
|
23 1 to:l do:[:pos | |
|
24 str at:pos put:$a. |
|
25 self assert:( str isBlank not ). |
|
26 str at:pos put:(Character space). |
|
27 ]. |
|
28 ]. |
|
29 |
|
30 " |
|
31 self new test01_access |
|
32 " |
|
33 ! |
|
34 |
|
35 test02_subclassAccess |
|
36 |myStringClass str| |
|
37 |
|
38 Class withoutUpdatingChangesDo:[ |
|
39 myStringClass := String |
|
40 subclass:#'MyString' |
|
41 instanceVariableNames:'foo' |
|
42 classVariableNames:'' |
|
43 poolDictionaries:nil. |
|
44 ]. |
|
45 |
|
46 0 to:33 do:[:l | |
|
47 str := myStringClass new:l. |
|
48 str atAllPut:(Character space). |
|
49 self assert:( str isBlank ). |
|
50 |
|
51 1 to:l do:[:pos | |
|
52 str at:pos put:$a. |
|
53 self assert:( str isBlank not ). |
|
54 str at:pos put:(Character space). |
|
55 ]. |
|
56 ]. |
|
57 |
|
58 " |
|
59 self new test02_subclassAccess |
|
60 " |
|
61 ! |
|
62 |
|
63 test10_Contains8BitCharacters |
16 0 to:33 do:[:l | |
64 0 to:33 do:[:l | |
17 |str| |
65 |str| |
18 |
66 |
19 str := String new:l. |
67 str := String new:l. |
20 str atAllPut:(Character value:16r7F). |
68 str atAllPut:(Character value:16r7F). |
26 str at:pos put:(Character value:16r7F). |
74 str at:pos put:(Character value:16r7F). |
27 ]. |
75 ]. |
28 ]. |
76 ]. |
29 |
77 |
30 " |
78 " |
31 self new test01Contains8BitCharacters |
79 self new test10_Contains8BitCharacters |
32 " |
80 " |
33 ! ! |
81 ! ! |
34 |
82 |
35 !StringTests class methodsFor:'documentation'! |
83 !StringTests class methodsFor:'documentation'! |
36 |
84 |