7 classVariableNames:'' |
7 classVariableNames:'' |
8 poolDictionaries:'' |
8 poolDictionaries:'' |
9 category:'tests-Regression' |
9 category:'tests-Regression' |
10 ! |
10 ! |
11 |
11 |
|
12 |
|
13 !BlockTest methodsFor:'defects'! |
|
14 |
|
15 g |
|
16 ^ True "/ the class here |
|
17 |
|
18 "Created: / 31-08-2007 / 17:40:37 / cg" |
|
19 ! |
|
20 |
|
21 h |
|
22 ^ True "/ the class here |
|
23 |
|
24 "Created: / 31-08-2007 / 17:40:39 / cg" |
|
25 ! |
|
26 |
|
27 testBlockWithEQEQ_1 |
|
28 |b v| |
|
29 |
|
30 b := [ self g == self h ]. |
|
31 v := b value. |
|
32 self assert:(v == true). |
|
33 |
|
34 |
|
35 " |
|
36 self new testBlockWithEQEQ_1 |
|
37 " |
|
38 |
|
39 "Created: / 31-08-2007 / 17:41:59 / cg" |
|
40 ! |
|
41 |
|
42 testBlockWithEQEQ_2 |
|
43 |b v| |
|
44 |
|
45 b := [ |
|
46 %{ |
|
47 #ifdef FOO |
|
48 %}. |
|
49 self thisIsNeverCalled. |
|
50 %{ |
|
51 #endif |
|
52 %}. |
|
53 self g == self h |
|
54 ]. |
|
55 v := b value. |
|
56 self assert:(v == true). |
|
57 |
|
58 |
|
59 " |
|
60 self new testBlockWithEQEQ_2 |
|
61 " |
|
62 |
|
63 "Created: / 31-08-2007 / 17:42:02 / cg" |
|
64 ! |
|
65 |
|
66 testBlockWithEQEQ_3 |
|
67 |b p v| |
|
68 |
|
69 p := self. |
|
70 |
|
71 [ |
|
72 |
|
73 b := [ |
|
74 %{ |
|
75 #ifdef FOO |
|
76 %}. |
|
77 self thisIsNeverCalled. |
|
78 %{ |
|
79 #endif |
|
80 %}. |
|
81 p g == p h |
|
82 ]. |
|
83 ] value. |
|
84 |
|
85 v := b value. |
|
86 self assert:(v == true). |
|
87 |
|
88 |
|
89 " |
|
90 self new testBlockWithEQEQ_3 |
|
91 " |
|
92 |
|
93 "Created: / 31-08-2007 / 17:44:07 / cg" |
|
94 ! |
|
95 |
|
96 testBlockWithEQEQ_4 |
|
97 |b p v Tmp| |
|
98 |
|
99 p := self. |
|
100 |
|
101 [ |
|
102 |
|
103 b := [ |foo| |
|
104 %{ |
|
105 #ifdef FOO |
|
106 %}. |
|
107 foo := Timestamp now. |
|
108 Tmp isNil ifTrue:[ |
|
109 Tmp := 'flags' copy. |
|
110 ] ifFalse:[ |
|
111 ObjectMemory stopBackgroundCollector. |
|
112 ]. |
|
113 self thisIsNeverCalled. |
|
114 %{ |
|
115 #endif |
|
116 %}. |
|
117 p g == p h |
|
118 ]. |
|
119 ] perform:((Base64Coder decode:'dmFsdWU=') asString asSymbol). |
|
120 |
|
121 v := b value. |
|
122 self assert:(v == true). |
|
123 |
|
124 |
|
125 " |
|
126 self new testBlockWithEQEQ_4 |
|
127 " |
|
128 |
|
129 "Created: / 31-08-2007 / 17:44:38 / cg" |
|
130 ! ! |
12 |
131 |
13 !BlockTest methodsFor:'varArgBlocks'! |
132 !BlockTest methodsFor:'varArgBlocks'! |
14 |
133 |
15 getBlock1 |
134 getBlock1 |
16 |b| |
135 |b| |