resin 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. data/amber/bin/amberc +10 -350
  2. data/amber/js/Benchfib.deploy.js +80 -89
  3. data/amber/js/Benchfib.js +80 -89
  4. data/amber/js/Canvas.deploy.js +558 -545
  5. data/amber/js/Canvas.js +563 -545
  6. data/amber/js/Compiler-AST.deploy.js +431 -243
  7. data/amber/js/Compiler-AST.js +487 -244
  8. data/amber/js/Compiler-Core.deploy.js +201 -1045
  9. data/amber/js/Compiler-Core.js +208 -1207
  10. data/amber/js/Compiler-Exceptions.deploy.js +37 -18
  11. data/amber/js/Compiler-Exceptions.js +42 -18
  12. data/amber/js/Compiler-IR.deploy.js +1071 -774
  13. data/amber/js/Compiler-IR.js +1194 -848
  14. data/amber/js/Compiler-Inlining.deploy.js +395 -373
  15. data/amber/js/Compiler-Inlining.js +395 -373
  16. data/amber/js/Compiler-Interpreter.deploy.js +1202 -0
  17. data/amber/js/Compiler-Interpreter.js +1631 -0
  18. data/amber/js/Compiler-Semantic.deploy.js +695 -600
  19. data/amber/js/Compiler-Semantic.js +721 -611
  20. data/amber/js/Compiler-Tests.deploy.js +699 -376
  21. data/amber/js/Compiler-Tests.js +834 -381
  22. data/amber/js/Compiler.deploy.js +8563 -1805
  23. data/amber/js/Compiler.js +11476 -2633
  24. data/amber/js/Examples.deploy.js +29 -29
  25. data/amber/js/Examples.js +29 -29
  26. data/amber/js/IDE.deploy.js +3292 -2649
  27. data/amber/js/IDE.js +3318 -2710
  28. data/amber/js/Importer-Exporter.deploy.js +393 -349
  29. data/amber/js/Importer-Exporter.js +398 -354
  30. data/amber/js/Kernel-Announcements.deploy.js +53 -44
  31. data/amber/js/Kernel-Announcements.js +55 -44
  32. data/amber/js/Kernel-Classes.deploy.js +566 -368
  33. data/amber/js/Kernel-Classes.js +660 -402
  34. data/amber/js/Kernel-Collections.deploy.js +1149 -1098
  35. data/amber/js/Kernel-Collections.js +1183 -1116
  36. data/amber/js/Kernel-Exceptions.deploy.js +173 -75
  37. data/amber/js/Kernel-Exceptions.js +215 -77
  38. data/amber/js/Kernel-Methods.deploy.js +530 -313
  39. data/amber/js/Kernel-Methods.js +632 -338
  40. data/amber/js/Kernel-Objects.deploy.js +1734 -1577
  41. data/amber/js/Kernel-Objects.js +1867 -1654
  42. data/amber/js/Kernel-Tests.deploy.js +1416 -973
  43. data/amber/js/Kernel-Tests.js +1495 -981
  44. data/amber/js/Kernel-Transcript.deploy.js +23 -24
  45. data/amber/js/Kernel-Transcript.js +25 -26
  46. data/amber/js/SUnit-Tests.deploy.js +402 -0
  47. data/amber/js/SUnit-Tests.js +518 -0
  48. data/amber/js/SUnit.deploy.js +535 -237
  49. data/amber/js/SUnit.js +634 -246
  50. data/amber/js/amber.js +90 -53
  51. data/amber/js/boot.js +441 -255
  52. data/amber/js/init.js +1 -3
  53. data/amber/js/lib/CodeMirror/codemirror.css +3 -0
  54. data/amber/js/lib/CodeMirror/codemirror.js +104 -55
  55. data/amber/js/lib/peg-0.7.0.min.js +9 -0
  56. data/amber/js/parser.js +1504 -802
  57. data/amber/js/parser.pegjs +170 -165
  58. data/amber/st/Canvas.st +6 -0
  59. data/amber/st/Compiler-AST.st +54 -3
  60. data/amber/st/Compiler-Core.st +6 -551
  61. data/amber/st/Compiler-Exceptions.st +4 -0
  62. data/amber/st/Compiler-IR.st +205 -87
  63. data/amber/st/Compiler-Interpreter.st +597 -0
  64. data/amber/st/Compiler-Semantic.st +46 -21
  65. data/amber/st/Compiler-Tests.st +254 -7
  66. data/amber/st/Compiler.st +3172 -1541
  67. data/amber/st/IDE.st +57 -93
  68. data/amber/st/Importer-Exporter.st +4 -7
  69. data/amber/st/Kernel-Announcements.st +8 -0
  70. data/amber/st/Kernel-Classes.st +149 -40
  71. data/amber/st/Kernel-Collections.st +43 -32
  72. data/amber/st/Kernel-Exceptions.st +70 -1
  73. data/amber/st/Kernel-Methods.st +165 -27
  74. data/amber/st/Kernel-Objects.st +215 -140
  75. data/amber/st/Kernel-Tests.st +195 -10
  76. data/amber/st/Kernel-Transcript.st +1 -3
  77. data/amber/st/SUnit-Tests.st +186 -0
  78. data/amber/st/SUnit.st +186 -14
  79. data/bin/resin +6 -0
  80. data/lib/resin/cli.rb +19 -0
  81. metadata +41 -25
  82. data/amber/js/lib/peg-0.6.2.min.js +0 -2
  83. data/bin/resin-compile +0 -6
  84. data/bin/runresin +0 -12
@@ -1,5 +1,45 @@
1
1
  smalltalk.addPackage('Kernel-Tests', {});
2
2
  smalltalk.addClass('BlockClosureTest', smalltalk.TestCase, [], 'Kernel-Tests');
3
+ smalltalk.addMethod(
4
+ "_testCanClearInterval",
5
+ smalltalk.method({
6
+ selector: "testCanClearInterval",
7
+ category: 'tests',
8
+ fn: function (){
9
+ var self=this;
10
+ return smalltalk.withContext(function($ctx1) {
11
+ return smalltalk.withContext(function($ctx2) {
12
+ return smalltalk.withContext(function($ctx3) {
13
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithInterval_((0)))._clearInterval();
14
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
15
+ return self}, function($ctx1) {$ctx1.fill(self,"testCanClearInterval",{}, smalltalk.BlockClosureTest)})},
16
+ args: [],
17
+ source: "testCanClearInterval\x0a\x09self shouldnt: [([Error new signal] valueWithInterval: 0) clearInterval] raise: Error",
18
+ messageSends: ["shouldnt:raise:", "clearInterval", "valueWithInterval:", "signal", "new"],
19
+ referencedClasses: ["Error"]
20
+ }),
21
+ smalltalk.BlockClosureTest);
22
+
23
+ smalltalk.addMethod(
24
+ "_testCanClearTimeout",
25
+ smalltalk.method({
26
+ selector: "testCanClearTimeout",
27
+ category: 'tests',
28
+ fn: function (){
29
+ var self=this;
30
+ return smalltalk.withContext(function($ctx1) {
31
+ return smalltalk.withContext(function($ctx2) {
32
+ return smalltalk.withContext(function($ctx3) {
33
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((0)))._clearTimeout();
34
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
35
+ return self}, function($ctx1) {$ctx1.fill(self,"testCanClearTimeout",{}, smalltalk.BlockClosureTest)})},
36
+ args: [],
37
+ source: "testCanClearTimeout\x0a\x09self shouldnt: [([Error new signal] valueWithTimeout: 0) clearTimeout] raise: Error",
38
+ messageSends: ["shouldnt:raise:", "clearTimeout", "valueWithTimeout:", "signal", "new"],
39
+ referencedClasses: ["Error"]
40
+ }),
41
+ smalltalk.BlockClosureTest);
42
+
3
43
  smalltalk.addMethod(
4
44
  "_testCompiledSource",
5
45
  smalltalk.method({
@@ -7,10 +47,10 @@ selector: "testCompiledSource",
7
47
  category: 'tests',
8
48
  fn: function (){
9
49
  var self=this;
10
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((function(){
11
- return smalltalk.send((1),"__plus",[(1)]);
12
- }),"_compiledSource",[]),"_includesSubString_",["function"])]);
13
- return self},
50
+ return smalltalk.withContext(function($ctx1) {
51
+ return smalltalk.withContext(function($ctx2) {
52
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._compiledSource())._includesSubString_("function"));
53
+ return self}, function($ctx1) {$ctx1.fill(self,"testCompiledSource",{}, smalltalk.BlockClosureTest)})},
14
54
  args: [],
15
55
  source: "testCompiledSource\x0a\x09self assert: ([1+1] compiledSource includesSubString: 'function')",
16
56
  messageSends: ["assert:", "includesSubString:", "compiledSource", "+"],
@@ -25,16 +65,16 @@ selector: "testEnsure",
25
65
  category: 'tests',
26
66
  fn: function (){
27
67
  var self=this;
28
- smalltalk.send(self,"_assert_",[smalltalk.send((function(){
29
- return smalltalk.send((smalltalk.Error || Error),"_new",[]);
30
- }),"_ensure_",[(function(){
31
- return true;
32
- })])]);
33
- return self},
68
+ return smalltalk.withContext(function($ctx1) {
69
+ return smalltalk.withContext(function($ctx2) {
70
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._ensure_((function(){
71
+ return smalltalk.withContext(function($ctx2) {
72
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
73
+ return self}, function($ctx1) {$ctx1.fill(self,"testEnsure",{}, smalltalk.BlockClosureTest)})},
34
74
  args: [],
35
- source: "testEnsure\x0a\x09self assert: ([Error new] ensure: [true])",
36
- messageSends: ["assert:", "ensure:", "new"],
37
- referencedClasses: ["Error"]
75
+ source: "testEnsure\x0a\x09self assert: 3 equals: ([3] ensure: [4])",
76
+ messageSends: ["assert:equals:", "ensure:"],
77
+ referencedClasses: []
38
78
  }),
39
79
  smalltalk.BlockClosureTest);
40
80
 
@@ -45,14 +85,14 @@ selector: "testEnsureRaises",
45
85
  category: 'tests',
46
86
  fn: function (){
47
87
  var self=this;
48
- smalltalk.send(self,"_should_raise_",[(function(){
49
- return smalltalk.send((function(){
50
- return smalltalk.send(smalltalk.send((smalltalk.Error || Error),"_new",[]),"_signal",[]);
51
- }),"_ensure_",[(function(){
52
- return true;
53
- })]);
54
- }),(smalltalk.Error || Error)]);
55
- return self},
88
+ return smalltalk.withContext(function($ctx1) {
89
+ return smalltalk.withContext(function($ctx2) {
90
+ return smalltalk.withContext(function($ctx3) {
91
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._ensure_((function(){
92
+ return smalltalk.withContext(function($ctx3) {
93
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
94
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
95
+ return self}, function($ctx1) {$ctx1.fill(self,"testEnsureRaises",{}, smalltalk.BlockClosureTest)})},
56
96
  args: [],
57
97
  source: "testEnsureRaises\x0a\x09self should: [[Error new signal] ensure: [true]] raise: Error",
58
98
  messageSends: ["should:raise:", "ensure:", "signal", "new"],
@@ -60,6 +100,32 @@ referencedClasses: ["Error"]
60
100
  }),
61
101
  smalltalk.BlockClosureTest);
62
102
 
103
+ smalltalk.addMethod(
104
+ "_testExceptionSemantics",
105
+ smalltalk.method({
106
+ selector: "testExceptionSemantics",
107
+ category: 'tests',
108
+ fn: function (){
109
+ var self=this;
110
+ return smalltalk.withContext(function($ctx1) {
111
+ _st(_st(self)._async_((function(){
112
+ return smalltalk.withContext(function($ctx2) {
113
+ return smalltalk.withContext(function($ctx3) {
114
+ _st((smalltalk.Error || Error))._signal();
115
+ _st(self)._deny_(true);
116
+ return _st(self)._finished();
117
+ }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
118
+ return smalltalk.withContext(function($ctx3) {
119
+ }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx1)})}));
120
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((0));
121
+ return self}, function($ctx1) {$ctx1.fill(self,"testExceptionSemantics",{}, smalltalk.BlockClosureTest)})},
122
+ args: [],
123
+ source: "testExceptionSemantics\x0a\x09\x22See https://github.com/NicolasPetton/amber/issues/314\x22\x0a self timeout: 100.\x0a \x0a (self async: [ \x0a \x09[ \x0a \x09self assert: true. \x0a Error signal. \x0a \x22The following should *not* be run\x22\x0a self deny: true.\x0a self finished.\x0a \x09\x09] on: Error do: [ :ex | self finished ] \x0a\x09]) valueWithTimeout: 0",
124
+ messageSends: ["timeout:", "valueWithTimeout:", "async:", "on:do:", "finished", "assert:", "signal", "deny:"],
125
+ referencedClasses: ["Error"]
126
+ }),
127
+ smalltalk.BlockClosureTest);
128
+
63
129
  smalltalk.addMethod(
64
130
  "_testNumArgs",
65
131
  smalltalk.method({
@@ -67,11 +133,11 @@ selector: "testNumArgs",
67
133
  category: 'tests',
68
134
  fn: function (){
69
135
  var self=this;
70
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(){
71
- }),"_numArgs",[]),(0)]);
72
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(a,b){
73
- }),"_numArgs",[]),(2)]);
74
- return self},
136
+ return smalltalk.withContext(function($ctx1) {
137
+ return smalltalk.withContext(function($ctx2) {
138
+ _st(self)._assert_equals_(_st((function(a,b){
139
+ return smalltalk.withContext(function($ctx2) {
140
+ return self}, function($ctx1) {$ctx1.fill(self,"testNumArgs",{}, smalltalk.BlockClosureTest)})},
75
141
  args: [],
76
142
  source: "testNumArgs\x0a\x09self assert: [] numArgs equals: 0.\x0a\x09self assert: [:a :b | ] numArgs equals: 2",
77
143
  messageSends: ["assert:equals:", "numArgs"],
@@ -86,12 +152,12 @@ selector: "testOnDo",
86
152
  category: 'tests',
87
153
  fn: function (){
88
154
  var self=this;
89
- smalltalk.send(self,"_assert_",[smalltalk.send((function(){
90
- return smalltalk.send(smalltalk.send((smalltalk.Error || Error),"_new",[]),"_signal",[]);
91
- }),"_on_do_",[(smalltalk.Error || Error),(function(ex){
92
- return true;
93
- })])]);
94
- return self},
155
+ return smalltalk.withContext(function($ctx1) {
156
+ return smalltalk.withContext(function($ctx2) {
157
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(ex){
158
+ return smalltalk.withContext(function($ctx2) {
159
+ }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})})));
160
+ return self}, function($ctx1) {$ctx1.fill(self,"testOnDo",{}, smalltalk.BlockClosureTest)})},
95
161
  args: [],
96
162
  source: "testOnDo\x0a\x09self assert: ([Error new signal] on: Error do: [:ex | true])",
97
163
  messageSends: ["assert:", "on:do:", "signal", "new"],
@@ -106,19 +172,19 @@ selector: "testValue",
106
172
  category: 'tests',
107
173
  fn: function (){
108
174
  var self=this;
109
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(){
110
- return smalltalk.send((1),"__plus",[(1)]);
111
- }),"_value",[]),(2)]);
112
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(x){
113
- return smalltalk.send(x,"__plus",[(1)]);
114
- }),"_value_",[(2)]),(3)]);
115
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(x,y){
116
- return smalltalk.send(x,"__star",[y]);
117
- }),"_value_value_",[(2),(4)]),(8)]);
118
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(a,b,c){
119
- return (1);
120
- }),"_value",[]),(1)]);
121
- return self},
175
+ return smalltalk.withContext(function($ctx1) {
176
+ return smalltalk.withContext(function($ctx2) {
177
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._value(),(2));
178
+ _st(self)._assert_equals_(_st((function(x){
179
+ return smalltalk.withContext(function($ctx2) {
180
+ }, function($ctx2) {$ctx2.fillBlock({x:x},$ctx1)})}))._value_((2)),(3));
181
+ _st(self)._assert_equals_(_st((function(x,y){
182
+ return smalltalk.withContext(function($ctx2) {
183
+ }, function($ctx2) {$ctx2.fillBlock({x:x,y:y},$ctx1)})}))._value_value_((2),(4)),(8));
184
+ _st(self)._assert_equals_(_st((function(a,b,c){
185
+ return smalltalk.withContext(function($ctx2) {
186
+ }, function($ctx2) {$ctx2.fillBlock({a:a,b:b,c:c},$ctx1)})}))._value(),(1));
187
+ return self}, function($ctx1) {$ctx1.fill(self,"testValue",{}, smalltalk.BlockClosureTest)})},
122
188
  args: [],
123
189
  source: "testValue\x0a\x09self assert: ([1+1] value) equals: 2.\x0a\x09self assert: ([:x | x +1] value: 2) equals: 3.\x0a\x09self assert: ([:x :y | x*y] value: 2 value: 4) equals: 8. \x0a\x0a\x09\x22Arguments are optional in Amber. This isn't ANSI compliant.\x22\x0a\x0a\x09self assert: ([:a :b :c | 1] value) equals: 1",
124
190
  messageSends: ["assert:equals:", "value", "+", "value:", "value:value:", "*"],
@@ -133,16 +199,16 @@ selector: "testValueWithPossibleArguments",
133
199
  category: 'tests',
134
200
  fn: function (){
135
201
  var self=this;
136
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(){
137
- return (1);
138
- }),"_valueWithPossibleArguments_",[[(3), (4)]]),(1)]);
139
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(a){
140
- return smalltalk.send(a,"__plus",[(4)]);
141
- }),"_valueWithPossibleArguments_",[[(3), (4)]]),(7)]);
142
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((function(a,b){
143
- return smalltalk.send(a,"__plus",[b]);
144
- }),"_valueWithPossibleArguments_",[[(3), (4), (5)]]),(7)]);
145
- return self},
202
+ return smalltalk.withContext(function($ctx1) {
203
+ return smalltalk.withContext(function($ctx2) {
204
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithPossibleArguments_([(3), (4)]),(1));
205
+ _st(self)._assert_equals_(_st((function(a){
206
+ return smalltalk.withContext(function($ctx2) {
207
+ }, function($ctx2) {$ctx2.fillBlock({a:a},$ctx1)})}))._valueWithPossibleArguments_([(3), (4)]),(7));
208
+ _st(self)._assert_equals_(_st((function(a,b){
209
+ return smalltalk.withContext(function($ctx2) {
210
+ }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}))._valueWithPossibleArguments_([(3), (4), (5)]),(7));
211
+ return self}, function($ctx1) {$ctx1.fill(self,"testValueWithPossibleArguments",{}, smalltalk.BlockClosureTest)})},
146
212
  args: [],
147
213
  source: "testValueWithPossibleArguments\x0a\x09self assert: ([1] valueWithPossibleArguments: #(3 4)) equals: 1.\x0a\x09self assert: ([:a | a + 4] valueWithPossibleArguments: #(3 4)) equals: 7.\x0a\x09self assert: ([:a :b | a + b] valueWithPossibleArguments: #(3 4 5)) equals: 7.",
148
214
  messageSends: ["assert:equals:", "valueWithPossibleArguments:", "+"],
@@ -158,22 +224,22 @@ category: 'tests',
158
224
  fn: function (){
159
225
  var self=this;
160
226
  var i;
161
- i=(0);
162
- smalltalk.send((function(){
163
- return smalltalk.send(i,"__gt",[(5)]);
164
- }),"_whileFalse_",[(function(){
165
- i=smalltalk.send(i,"__plus",[(1)]);
227
+ return smalltalk.withContext(function($ctx1) {
228
+ _st((function(){
229
+ return smalltalk.withContext(function($ctx2) {
230
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
231
+ return smalltalk.withContext(function($ctx2) {
166
232
  return i;
167
- })]);
168
- smalltalk.send(self,"_assert_equals_",[i,(6)]);
233
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
234
+ _st(self)._assert_equals_(i,(6));
169
235
  i=(0);
170
- smalltalk.send((function(){
171
- i=smalltalk.send(i,"__plus",[(1)]);
236
+ _st((function(){
237
+ return smalltalk.withContext(function($ctx2) {
172
238
  i;
173
- return smalltalk.send(i,"__gt",[(5)]);
174
- }),"_whileFalse",[]);
175
- smalltalk.send(self,"_assert_equals_",[i,(6)]);
176
- return self},
239
+ return _st(i).__gt((5));
240
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse();
241
+ _st(self)._assert_equals_(i,(6));
242
+ return self}, function($ctx1) {$ctx1.fill(self,"testWhileFalse",{i:i}, smalltalk.BlockClosureTest)})},
177
243
  args: [],
178
244
  source: "testWhileFalse\x0a\x09| i |\x0a\x09i := 0.\x0a\x09[i > 5] whileFalse: [i := i + 1].\x0a\x09self assert: i equals: 6.\x0a\x0a\x09i := 0.\x0a\x09[i := i + 1. i > 5] whileFalse.\x0a\x09self assert: i equals: 6",
179
245
  messageSends: ["whileFalse:", "+", ">", "assert:equals:", "whileFalse"],
@@ -189,22 +255,22 @@ category: 'tests',
189
255
  fn: function (){
190
256
  var self=this;
191
257
  var i;
192
- i=(0);
193
- smalltalk.send((function(){
194
- return smalltalk.send(i,"__lt",[(5)]);
195
- }),"_whileTrue_",[(function(){
196
- i=smalltalk.send(i,"__plus",[(1)]);
258
+ return smalltalk.withContext(function($ctx1) {
259
+ _st((function(){
260
+ return smalltalk.withContext(function($ctx2) {
261
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
262
+ return smalltalk.withContext(function($ctx2) {
197
263
  return i;
198
- })]);
199
- smalltalk.send(self,"_assert_equals_",[i,(5)]);
264
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
265
+ _st(self)._assert_equals_(i,(5));
200
266
  i=(0);
201
- smalltalk.send((function(){
202
- i=smalltalk.send(i,"__plus",[(1)]);
267
+ _st((function(){
268
+ return smalltalk.withContext(function($ctx2) {
203
269
  i;
204
- return smalltalk.send(i,"__lt",[(5)]);
205
- }),"_whileTrue",[]);
206
- smalltalk.send(self,"_assert_equals_",[i,(5)]);
207
- return self},
270
+ return _st(i).__lt((5));
271
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue();
272
+ _st(self)._assert_equals_(i,(5));
273
+ return self}, function($ctx1) {$ctx1.fill(self,"testWhileTrue",{i:i}, smalltalk.BlockClosureTest)})},
208
274
  args: [],
209
275
  source: "testWhileTrue\x0a\x09| i |\x0a\x09i := 0.\x0a\x09[i < 5] whileTrue: [i := i + 1].\x0a\x09self assert: i equals: 5.\x0a\x0a\x09i := 0.\x0a\x09[i := i + 1. i < 5] whileTrue.\x0a\x09self assert: i equals: 5",
210
276
  messageSends: ["whileTrue:", "+", "<", "assert:equals:", "whileTrue"],
@@ -222,17 +288,17 @@ selector: "testEquality",
222
288
  category: 'tests',
223
289
  fn: function (){
224
290
  var self=this;
225
- smalltalk.send(self,"_deny_",[smalltalk.send((0),"__eq",[false])]);
226
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"__eq",[(0)])]);
227
- smalltalk.send(self,"_deny_",[smalltalk.send("","__eq",[false])]);
228
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"__eq",[""])]);
229
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"__eq",[true])]);
230
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"__eq",[true])]);
231
- smalltalk.send(self,"_deny_",[smalltalk.send(true,"__eq",[false])]);
232
- smalltalk.send(self,"_assert_",[smalltalk.send(false,"__eq",[false])]);
233
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(true,"_yourself",[]),"__eq",[true])]);
234
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(true,"_yourself",[]),"__eq",[smalltalk.send(true,"_yourself",[])])]);
235
- return self},
291
+ return smalltalk.withContext(function($ctx1) {
292
+ _st(self)._deny_(_st(false).__eq((0)));
293
+ _st(self)._deny_(_st("").__eq(false));
294
+ _st(self)._deny_(_st(false).__eq(""));
295
+ _st(self)._assert_(_st(true).__eq(true));
296
+ _st(self)._deny_(_st(false).__eq(true));
297
+ _st(self)._deny_(_st(true).__eq(false));
298
+ _st(self)._assert_(_st(false).__eq(false));
299
+ _st(self)._assert_(_st(_st(true)._yourself()).__eq(true));
300
+ _st(self)._assert_(_st(_st(true)._yourself()).__eq(_st(true)._yourself()));
301
+ return self}, function($ctx1) {$ctx1.fill(self,"testEquality",{}, smalltalk.BooleanTest)})},
236
302
  args: [],
237
303
  source: "testEquality\x0a\x09\x22We're on top of JS...just be sure to check the basics!\x22\x0a\x0a\x09self deny: 0 = false. \x0a\x09self deny: false = 0.\x0a\x09self deny: '' = false.\x0a\x09self deny: false = ''.\x0a\x0a\x09self assert: true = true.\x0a\x09self deny: false = true.\x0a\x09self deny: true = false.\x0a\x09self assert: false = false.\x0a\x0a\x09\x22JS may do some type coercing after sending a message\x22\x0a\x09self assert: true yourself = true.\x0a\x09self assert: true yourself = true yourself",
238
304
  messageSends: ["deny:", "=", "assert:", "yourself"],
@@ -247,17 +313,17 @@ selector: "testIdentity",
247
313
  category: 'tests',
248
314
  fn: function (){
249
315
  var self=this;
250
- smalltalk.send(self,"_deny_",[smalltalk.send((0),"__eq_eq",[false])]);
251
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"__eq_eq",[(0)])]);
252
- smalltalk.send(self,"_deny_",[smalltalk.send("","__eq_eq",[false])]);
253
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"__eq_eq",[""])]);
254
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"__eq_eq",[true])]);
255
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"__eq_eq",[true])]);
256
- smalltalk.send(self,"_deny_",[smalltalk.send(true,"__eq_eq",[false])]);
257
- smalltalk.send(self,"_assert_",[smalltalk.send(false,"__eq_eq",[false])]);
258
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(true,"_yourself",[]),"__eq_eq",[true])]);
259
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(true,"_yourself",[]),"__eq_eq",[smalltalk.send(true,"_yourself",[])])]);
260
- return self},
316
+ return smalltalk.withContext(function($ctx1) {
317
+ _st(self)._deny_(_st(false).__eq_eq((0)));
318
+ _st(self)._deny_(_st("").__eq_eq(false));
319
+ _st(self)._deny_(_st(false).__eq_eq(""));
320
+ _st(self)._assert_(_st(true).__eq_eq(true));
321
+ _st(self)._deny_(_st(false).__eq_eq(true));
322
+ _st(self)._deny_(_st(true).__eq_eq(false));
323
+ _st(self)._assert_(_st(false).__eq_eq(false));
324
+ _st(self)._assert_(_st(_st(true)._yourself()).__eq_eq(true));
325
+ _st(self)._assert_(_st(_st(true)._yourself()).__eq_eq(_st(true)._yourself()));
326
+ return self}, function($ctx1) {$ctx1.fill(self,"testIdentity",{}, smalltalk.BooleanTest)})},
261
327
  args: [],
262
328
  source: "testIdentity\x0a\x09\x22We're on top of JS...just be sure to check the basics!\x22\x0a\x0a\x09self deny: 0 == false. \x0a\x09self deny: false == 0.\x0a\x09self deny: '' == false.\x0a\x09self deny: false == ''.\x0a\x0a\x09self assert: true == true.\x0a\x09self deny: false == true.\x0a\x09self deny: true == false.\x0a\x09self assert: false == false.\x0a\x0a\x09\x22JS may do some type coercing after sending a message\x22\x0a\x09self assert: true yourself == true.\x0a\x09self assert: true yourself == true yourself",
263
329
  messageSends: ["deny:", "==", "assert:", "yourself"],
@@ -272,48 +338,64 @@ selector: "testIfTrueIfFalse",
272
338
  category: 'tests',
273
339
  fn: function (){
274
340
  var self=this;
275
- var $1,$2,$3,$4,$5,$6,$7,$8;
341
+ return smalltalk.withContext(function($ctx1) {
342
+ $1=self;
276
343
  if(smalltalk.assert(true)){
277
- $1="alternative block";
344
+ $3="alternative block";
278
345
  };
279
- smalltalk.send(self,"_assert_",[smalltalk.send($1,"__eq",["alternative block"])]);
346
+ $2=_st($3).__eq("alternative block");
347
+ _st($1)._assert_($2);
348
+ $4=self;
280
349
  if(! smalltalk.assert(true)){
281
- $2="alternative block";
350
+ $6="alternative block";
282
351
  };
283
- smalltalk.send(self,"_assert_",[smalltalk.send($2,"__eq",[nil])]);
352
+ $5=_st($6).__eq(nil);
353
+ _st($4)._assert_($5);
354
+ $7=self;
284
355
  if(smalltalk.assert(false)){
285
- $3="alternative block";
356
+ $9="alternative block";
286
357
  };
287
- smalltalk.send(self,"_assert_",[smalltalk.send($3,"__eq",[nil])]);
358
+ $8=_st($9).__eq(nil);
359
+ _st($7)._assert_($8);
360
+ $10=self;
288
361
  if(! smalltalk.assert(false)){
289
- $4="alternative block";
362
+ $12="alternative block";
290
363
  };
291
- smalltalk.send(self,"_assert_",[smalltalk.send($4,"__eq",["alternative block"])]);
364
+ $11=_st($12).__eq("alternative block");
365
+ _st($10)._assert_($11);
366
+ $13=self;
292
367
  if(smalltalk.assert(false)){
293
- $5="alternative block";
368
+ $15="alternative block";
294
369
  } else {
295
- $5="alternative block2";
370
+ $15="alternative block2";
296
371
  };
297
- smalltalk.send(self,"_assert_",[smalltalk.send($5,"__eq",["alternative block2"])]);
372
+ $14=_st($15).__eq("alternative block2");
373
+ _st($13)._assert_($14);
374
+ $16=self;
298
375
  if(smalltalk.assert(false)){
299
- $6="alternative block2";
376
+ $18="alternative block2";
300
377
  } else {
301
- $6="alternative block";
378
+ $18="alternative block";
302
379
  };
303
- smalltalk.send(self,"_assert_",[smalltalk.send($6,"__eq",["alternative block"])]);
380
+ $17=_st($18).__eq("alternative block");
381
+ _st($16)._assert_($17);
382
+ $19=self;
304
383
  if(smalltalk.assert(true)){
305
- $7="alternative block";
384
+ $21="alternative block";
306
385
  } else {
307
- $7="alternative block2";
386
+ $21="alternative block2";
308
387
  };
309
- smalltalk.send(self,"_assert_",[smalltalk.send($7,"__eq",["alternative block"])]);
388
+ $20=_st($21).__eq("alternative block");
389
+ _st($19)._assert_($20);
390
+ $22=self;
310
391
  if(smalltalk.assert(true)){
311
- $8="alternative block2";
392
+ $24="alternative block2";
312
393
  } else {
313
- $8="alternative block";
394
+ $24="alternative block";
314
395
  };
315
- smalltalk.send(self,"_assert_",[smalltalk.send($8,"__eq",["alternative block2"])]);
316
- return self},
396
+ $23=_st($24).__eq("alternative block2");
397
+ _st($22)._assert_($23);
398
+ return self}, function($ctx1) {$ctx1.fill(self,"testIfTrueIfFalse",{}, smalltalk.BooleanTest)})},
317
399
  args: [],
318
400
  source: "testIfTrueIfFalse\x0a \x0a\x09self assert: (true ifTrue: ['alternative block']) = 'alternative block'.\x0a\x09self assert: (true ifFalse: ['alternative block']) = nil.\x0a\x0a\x09self assert: (false ifTrue: ['alternative block']) = nil.\x0a\x09self assert: (false ifFalse: ['alternative block']) = 'alternative block'.\x0a\x0a\x09self assert: (false ifTrue: ['alternative block'] ifFalse: ['alternative block2']) = 'alternative block2'.\x0a\x09self assert: (false ifFalse: ['alternative block'] ifTrue: ['alternative block2']) = 'alternative block'.\x0a\x0a\x09self assert: (true ifTrue: ['alternative block'] ifFalse: ['alternative block2']) = 'alternative block'.\x0a\x09self assert: (true ifFalse: ['alternative block'] ifTrue: ['alternative block2']) = 'alternative block2'.",
319
401
  messageSends: ["assert:", "=", "ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:"],
@@ -321,6 +403,86 @@ referencedClasses: []
321
403
  }),
322
404
  smalltalk.BooleanTest);
323
405
 
406
+ smalltalk.addMethod(
407
+ "_testIfTrueIfFalseWithBoxing",
408
+ smalltalk.method({
409
+ selector: "testIfTrueIfFalseWithBoxing",
410
+ category: 'tests',
411
+ fn: function (){
412
+ var self=this;
413
+ return smalltalk.withContext(function($ctx1) {
414
+ $1=self;
415
+ $4=_st(true)._yourself();
416
+ if(smalltalk.assert($4)){
417
+ $3="alternative block";
418
+ };
419
+ $2=_st($3).__eq("alternative block");
420
+ _st($1)._assert_($2);
421
+ $5=self;
422
+ $8=_st(true)._yourself();
423
+ if(! smalltalk.assert($8)){
424
+ $7="alternative block";
425
+ };
426
+ $6=_st($7).__eq(nil);
427
+ _st($5)._assert_($6);
428
+ $9=self;
429
+ $12=_st(false)._yourself();
430
+ if(smalltalk.assert($12)){
431
+ $11="alternative block";
432
+ };
433
+ $10=_st($11).__eq(nil);
434
+ _st($9)._assert_($10);
435
+ $13=self;
436
+ $16=_st(false)._yourself();
437
+ if(! smalltalk.assert($16)){
438
+ $15="alternative block";
439
+ };
440
+ $14=_st($15).__eq("alternative block");
441
+ _st($13)._assert_($14);
442
+ $17=self;
443
+ $20=_st(false)._yourself();
444
+ if(smalltalk.assert($20)){
445
+ $19="alternative block";
446
+ } else {
447
+ $19="alternative block2";
448
+ };
449
+ $18=_st($19).__eq("alternative block2");
450
+ _st($17)._assert_($18);
451
+ $21=self;
452
+ $24=_st(false)._yourself();
453
+ if(smalltalk.assert($24)){
454
+ $23="alternative block2";
455
+ } else {
456
+ $23="alternative block";
457
+ };
458
+ $22=_st($23).__eq("alternative block");
459
+ _st($21)._assert_($22);
460
+ $25=self;
461
+ $28=_st(true)._yourself();
462
+ if(smalltalk.assert($28)){
463
+ $27="alternative block";
464
+ } else {
465
+ $27="alternative block2";
466
+ };
467
+ $26=_st($27).__eq("alternative block");
468
+ _st($25)._assert_($26);
469
+ $29=self;
470
+ $32=_st(true)._yourself();
471
+ if(smalltalk.assert($32)){
472
+ $31="alternative block2";
473
+ } else {
474
+ $31="alternative block";
475
+ };
476
+ $30=_st($31).__eq("alternative block2");
477
+ _st($29)._assert_($30);
478
+ return self}, function($ctx1) {$ctx1.fill(self,"testIfTrueIfFalseWithBoxing",{}, smalltalk.BooleanTest)})},
479
+ args: [],
480
+ source: "testIfTrueIfFalseWithBoxing\x0a \x0a\x09self assert: (true yourself ifTrue: ['alternative block']) = 'alternative block'.\x0a\x09self assert: (true yourself ifFalse: ['alternative block']) = nil.\x0a\x0a\x09self assert: (false yourself ifTrue: ['alternative block']) = nil.\x0a\x09self assert: (false yourself ifFalse: ['alternative block']) = 'alternative block'.\x0a\x0a\x09self assert: (false yourself ifTrue: ['alternative block'] ifFalse: ['alternative block2']) = 'alternative block2'.\x0a\x09self assert: (false yourself ifFalse: ['alternative block'] ifTrue: ['alternative block2']) = 'alternative block'.\x0a\x0a\x09self assert: (true yourself ifTrue: ['alternative block'] ifFalse: ['alternative block2']) = 'alternative block'.\x0a\x09self assert: (true yourself ifFalse: ['alternative block'] ifTrue: ['alternative block2']) = 'alternative block2'.",
481
+ messageSends: ["assert:", "=", "ifTrue:", "yourself", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:"],
482
+ referencedClasses: []
483
+ }),
484
+ smalltalk.BooleanTest);
485
+
324
486
  smalltalk.addMethod(
325
487
  "_testLogic",
326
488
  smalltalk.method({
@@ -328,22 +490,26 @@ selector: "testLogic",
328
490
  category: 'tests',
329
491
  fn: function (){
330
492
  var self=this;
331
- var $1,$2,$3,$4;
332
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"_&",[true])]);
333
- smalltalk.send(self,"_deny_",[smalltalk.send(true,"_&",[false])]);
334
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"_&",[true])]);
335
- $1=smalltalk.send(self,"_deny_",[smalltalk.send(false,"_&",[false])]);
336
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"_|",[true])]);
337
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"_|",[false])]);
338
- smalltalk.send(self,"_assert_",[smalltalk.send(false,"_|",[true])]);
339
- $2=smalltalk.send(self,"_deny_",[smalltalk.send(false,"_|",[false])]);
340
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"_&",[smalltalk.send((1),"__gt",[(0)])])]);
341
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send((1),"__gt",[(0)]),"_&",[false])]);
342
- $3=smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send((1),"__gt",[(0)]),"_&",[smalltalk.send((1),"__gt",[(2)])])]);
343
- smalltalk.send(self,"_assert_",[smalltalk.send(false,"_|",[smalltalk.send((1),"__gt",[(0)])])]);
344
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"__gt",[(0)]),"_|",[false])]);
345
- $4=smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"__gt",[(0)]),"_|",[smalltalk.send((1),"__gt",[(2)])])]);
346
- return self},
493
+ return smalltalk.withContext(function($ctx1) {
494
+ $1=self;
495
+ _st($1)._assert_(_st(true).__and(true));
496
+ _st($1)._deny_(_st(true).__and(false));
497
+ _st($1)._deny_(_st(false).__and(true));
498
+ $2=_st($1)._deny_(_st(false).__and(false));
499
+ $3=self;
500
+ _st($3)._assert_(_st(true).__or(true));
501
+ _st($3)._assert_(_st(true).__or(false));
502
+ _st($3)._assert_(_st(false).__or(true));
503
+ $4=_st($3)._deny_(_st(false).__or(false));
504
+ $5=self;
505
+ _st($5)._assert_(_st(true).__and(_st((1)).__gt((0))));
506
+ _st($5)._deny_(_st(_st((1)).__gt((0))).__and(false));
507
+ $6=_st($5)._deny_(_st(_st((1)).__gt((0))).__and(_st((1)).__gt((2))));
508
+ $7=self;
509
+ _st($7)._assert_(_st(false).__or(_st((1)).__gt((0))));
510
+ _st($7)._assert_(_st(_st((1)).__gt((0))).__or(false));
511
+ $8=_st($7)._assert_(_st(_st((1)).__gt((0))).__or(_st((1)).__gt((2))));
512
+ return self}, function($ctx1) {$ctx1.fill(self,"testLogic",{}, smalltalk.BooleanTest)})},
347
513
  args: [],
348
514
  source: "testLogic\x0a \x0a\x09\x22Trivial logic table\x22\x0a\x09self assert: (true & true); deny: (true & false); deny: (false & true); deny: (false & false).\x0a\x09self assert: (true | true); assert: (true | false); assert: (false | true); deny: (false | false).\x0a \x22Checking that expressions work fine too\x22\x0a\x09self assert: (true & (1 > 0)); deny: ((1 > 0) & false); deny: ((1 > 0) & (1 > 2)).\x0a self assert: (false | (1 > 0)); assert: ((1 > 0) | false); assert: ((1 > 0) | (1 > 2))",
349
515
  messageSends: ["assert:", "&", "deny:", "|", ">"],
@@ -358,50 +524,54 @@ selector: "testLogicKeywords",
358
524
  category: 'tests',
359
525
  fn: function (){
360
526
  var self=this;
361
- var $1,$2,$3,$4;
362
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"_and_",[(function(){
363
- return true;
364
- })])]);
365
- smalltalk.send(self,"_deny_",[smalltalk.send(true,"_and_",[(function(){
366
- return false;
367
- })])]);
368
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"_and_",[(function(){
369
- return true;
370
- })])]);
371
- $1=smalltalk.send(self,"_deny_",[smalltalk.send(false,"_and_",[(function(){
372
- return false;
373
- })])]);
374
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"_or_",[(function(){
375
- return true;
376
- })])]);
377
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"_or_",[(function(){
378
- return false;
379
- })])]);
380
- smalltalk.send(self,"_assert_",[smalltalk.send(false,"_or_",[(function(){
381
- return true;
382
- })])]);
383
- $2=smalltalk.send(self,"_deny_",[smalltalk.send(false,"_or_",[(function(){
384
- return false;
385
- })])]);
386
- smalltalk.send(self,"_assert_",[smalltalk.send(true,"_and_",[(function(){
387
- return smalltalk.send((1),"__gt",[(0)]);
388
- })])]);
389
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send((1),"__gt",[(0)]),"_and_",[(function(){
390
- return false;
391
- })])]);
392
- $3=smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send((1),"__gt",[(0)]),"_and_",[(function(){
393
- return smalltalk.send((1),"__gt",[(2)]);
394
- })])]);
395
- smalltalk.send(self,"_assert_",[smalltalk.send(false,"_or_",[(function(){
396
- return smalltalk.send((1),"__gt",[(0)]);
397
- })])]);
398
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"__gt",[(0)]),"_or_",[(function(){
399
- return false;
400
- })])]);
401
- $4=smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"__gt",[(0)]),"_or_",[(function(){
402
- return smalltalk.send((1),"__gt",[(2)]);
403
- })])]);
404
- return self},
527
+ return smalltalk.withContext(function($ctx1) {
528
+ $1=self;
529
+ _st($1)._assert_(_st(true)._and_((function(){
530
+ return smalltalk.withContext(function($ctx2) {
531
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
532
+ _st($1)._deny_(_st(true)._and_((function(){
533
+ return smalltalk.withContext(function($ctx2) {
534
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
535
+ _st($1)._deny_(_st(false)._and_((function(){
536
+ return smalltalk.withContext(function($ctx2) {
537
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
538
+ $2=_st($1)._deny_(_st(false)._and_((function(){
539
+ return smalltalk.withContext(function($ctx2) {
540
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
541
+ $3=self;
542
+ _st($3)._assert_(_st(true)._or_((function(){
543
+ return smalltalk.withContext(function($ctx2) {
544
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
545
+ _st($3)._assert_(_st(true)._or_((function(){
546
+ return smalltalk.withContext(function($ctx2) {
547
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
548
+ _st($3)._assert_(_st(false)._or_((function(){
549
+ return smalltalk.withContext(function($ctx2) {
550
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
551
+ $4=_st($3)._deny_(_st(false)._or_((function(){
552
+ return smalltalk.withContext(function($ctx2) {
553
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
554
+ $5=self;
555
+ _st($5)._assert_(_st(true)._and_((function(){
556
+ return smalltalk.withContext(function($ctx2) {
557
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
558
+ _st($5)._deny_(_st(_st((1)).__gt((0)))._and_((function(){
559
+ return smalltalk.withContext(function($ctx2) {
560
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
561
+ $6=_st($5)._deny_(_st(_st((1)).__gt((0)))._and_((function(){
562
+ return smalltalk.withContext(function($ctx2) {
563
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
564
+ $7=self;
565
+ _st($7)._assert_(_st(false)._or_((function(){
566
+ return smalltalk.withContext(function($ctx2) {
567
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
568
+ _st($7)._assert_(_st(_st((1)).__gt((0)))._or_((function(){
569
+ return smalltalk.withContext(function($ctx2) {
570
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
571
+ $8=_st($7)._assert_(_st(_st((1)).__gt((0)))._or_((function(){
572
+ return smalltalk.withContext(function($ctx2) {
573
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
574
+ return self}, function($ctx1) {$ctx1.fill(self,"testLogicKeywords",{}, smalltalk.BooleanTest)})},
405
575
  args: [],
406
576
  source: "testLogicKeywords\x0a \x0a\x09\x22Trivial logic table\x22\x0a\x09self \x0a\x09\x09assert: (true and: [ true]); \x0a\x09\x09deny: (true and: [ false ]); \x0a\x09\x09deny: (false and: [ true ]); \x0a\x09\x09deny: (false and: [ false ]).\x0a\x09self \x0a\x09\x09assert: (true or: [ true ]); \x0a\x09\x09assert: (true or: [ false ]); \x0a\x09\x09assert: (false or: [ true ]); \x0a\x09\x09deny: (false or: [ false ]).\x0a \x0a\x09\x22Checking that expressions work fine too\x22\x0a\x09self \x0a\x09\x09assert: (true and: [ 1 > 0 ]); \x0a\x09\x09deny: ((1 > 0) and: [ false ]); \x0a\x09\x09deny: ((1 > 0) and: [ 1 > 2 ]).\x0a self \x0a\x09\x09assert: (false or: [ 1 > 0 ]); \x0a\x09\x09assert: ((1 > 0) or: [ false ]); \x0a\x09\x09assert: ((1 > 0) or: [ 1 > 2 ])",
407
577
  messageSends: ["assert:", "and:", "deny:", "or:", ">"],
@@ -416,17 +586,17 @@ selector: "testNonBooleanError",
416
586
  category: 'tests',
417
587
  fn: function (){
418
588
  var self=this;
419
- var b;
420
- b= '' ;
421
- ;
422
- smalltalk.send(self,"_should_raise_",[(function(){
423
- if(smalltalk.assert(self["@nonBoolean"])){
589
+ return smalltalk.withContext(function($ctx1) {
590
+ $1=self;
591
+ $2=(function(){
592
+ return smalltalk.withContext(function($ctx2) {
424
593
  } else {
425
594
  };
426
- }),(smalltalk.NonBooleanReceiver || NonBooleanReceiver)]);
427
- return self},
595
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
596
+ _st($1)._should_raise_($2,(smalltalk.NonBooleanReceiver || NonBooleanReceiver));
597
+ return self}, function($ctx1) {$ctx1.fill(self,"testNonBooleanError",{}, smalltalk.BooleanTest)})},
428
598
  args: [],
429
- source: "testNonBooleanError\x0a\x09|b|\x0a b := < '' >.\x0a self should: [nonBoolean ifTrue: [] ifFalse: []] raise: NonBooleanReceiver",
599
+ source: "testNonBooleanError\x0a self should: [ '' ifTrue: [] ifFalse: [] ] raise: NonBooleanReceiver",
430
600
  messageSends: ["should:raise:", "ifTrue:ifFalse:"],
431
601
  referencedClasses: ["NonBooleanReceiver"]
432
602
  }),
@@ -442,8 +612,8 @@ selector: "setUp",
442
612
  category: 'running',
443
613
  fn: function (){
444
614
  var self=this;
445
- self["@builder"]=smalltalk.send((smalltalk.ClassBuilder || ClassBuilder),"_new",[]);
446
- return self},
615
+ return smalltalk.withContext(function($ctx1) {
616
+ return self}, function($ctx1) {$ctx1.fill(self,"setUp",{}, smalltalk.ClassBuilderTest)})},
447
617
  args: [],
448
618
  source: "setUp\x0a\x09builder := ClassBuilder new",
449
619
  messageSends: ["new"],
@@ -458,14 +628,16 @@ selector: "tearDown",
458
628
  category: 'running',
459
629
  fn: function (){
460
630
  var self=this;
461
- if(($receiver = self["@theClass"]) == nil || $receiver == undefined){
462
- self["@theClass"];
631
+ return smalltalk.withContext(function($ctx1) {
632
+ $1=self["@theClass"];
633
+ if(($receiver = $1) == nil || $receiver == undefined){
634
+ $1;
463
635
  } else {
464
- smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_removeClass_",[self["@theClass"]]);
636
+ _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removeClass_(self["@theClass"]);
465
637
  self["@theClass"]=nil;
466
638
  self["@theClass"];
467
639
  };
468
- return self},
640
+ return self}, function($ctx1) {$ctx1.fill(self,"tearDown",{}, smalltalk.ClassBuilderTest)})},
469
641
  args: [],
470
642
  source: "tearDown\x0a\x09theClass ifNotNil: [Smalltalk current removeClass: theClass. theClass := nil]",
471
643
  messageSends: ["ifNotNil:", "removeClass:", "current"],
@@ -480,13 +652,13 @@ selector: "testClassCopy",
480
652
  category: 'running',
481
653
  fn: function (){
482
654
  var self=this;
483
- self["@theClass"]=smalltalk.send(self["@builder"],"_copyClass_named_",[(smalltalk.ObjectMock || ObjectMock),"ObjectMock2"]);
484
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(self["@theClass"],"_superclass",[]),"__eq_eq",[smalltalk.send((smalltalk.ObjectMock || ObjectMock),"_superclass",[])])]);
485
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(self["@theClass"],"_instanceVariableNames",[]),"__eq_eq",[smalltalk.send((smalltalk.ObjectMock || ObjectMock),"_instanceVariableNames",[])])]);
486
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(self["@theClass"],"_name",[]),"ObjectMock2"]);
487
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(self["@theClass"],"_package",[]),"__eq_eq",[smalltalk.send((smalltalk.ObjectMock || ObjectMock),"_package",[])])]);
488
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send(self["@theClass"],"_methodDictionary",[]),"_keys",[]),smalltalk.send(smalltalk.send((smalltalk.ObjectMock || ObjectMock),"_methodDictionary",[]),"_keys",[])]);
489
- return self},
655
+ return smalltalk.withContext(function($ctx1) {
656
+ _st(self)._assert_(_st(_st(self["@theClass"])._superclass()).__eq_eq(_st((smalltalk.ObjectMock || ObjectMock))._superclass()));
657
+ _st(self)._assert_(_st(_st(self["@theClass"])._instanceVariableNames()).__eq_eq(_st((smalltalk.ObjectMock || ObjectMock))._instanceVariableNames()));
658
+ _st(self)._assert_equals_(_st(self["@theClass"])._name(),"ObjectMock2");
659
+ _st(self)._assert_(_st(_st(self["@theClass"])._package()).__eq_eq(_st((smalltalk.ObjectMock || ObjectMock))._package()));
660
+ _st(self)._assert_equals_(_st(_st(self["@theClass"])._methodDictionary())._keys(),_st(_st((smalltalk.ObjectMock || ObjectMock))._methodDictionary())._keys());
661
+ return self}, function($ctx1) {$ctx1.fill(self,"testClassCopy",{}, smalltalk.ClassBuilderTest)})},
490
662
  args: [],
491
663
  source: "testClassCopy\x0a\x09theClass := builder copyClass: ObjectMock named: 'ObjectMock2'.\x0a\x09self assert: theClass superclass == ObjectMock superclass.\x0a\x09self assert: theClass instanceVariableNames == ObjectMock instanceVariableNames.\x0a\x09self assert: theClass name equals: 'ObjectMock2'.\x0a\x09self assert: theClass package == ObjectMock package.\x0a\x09self assert: theClass methodDictionary keys equals: ObjectMock methodDictionary keys",
492
664
  messageSends: ["copyClass:named:", "assert:", "==", "superclass", "instanceVariableNames", "assert:equals:", "name", "package", "keys", "methodDictionary"],
@@ -494,6 +666,80 @@ referencedClasses: ["ObjectMock"]
494
666
  }),
495
667
  smalltalk.ClassBuilderTest);
496
668
 
669
+ smalltalk.addMethod(
670
+ "_testClassMigration",
671
+ smalltalk.method({
672
+ selector: "testClassMigration",
673
+ category: 'running',
674
+ fn: function (){
675
+ var self=this;
676
+ var instance,oldClass;
677
+ return smalltalk.withContext(function($ctx1) {
678
+ instance=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_("ObjectMock2"))._new();
679
+ _st((smalltalk.ObjectMock || ObjectMock))._subclass_instanceVariableNames_package_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_("ObjectMock2"),"","Kernel-Tests");
680
+ _st(self)._deny_(_st(oldClass).__eq_eq((smalltalk.ObjectMock2 || ObjectMock2)));
681
+ _st(self)._assert_(_st(_st((smalltalk.ObjectMock2 || ObjectMock2))._superclass()).__eq_eq((smalltalk.ObjectMock || ObjectMock)));
682
+ _st(self)._assert_(_st(_st((smalltalk.ObjectMock2 || ObjectMock2))._instanceVariableNames())._isEmpty());
683
+ _st(self)._assert_equals_(_st((smalltalk.ObjectMock2 || ObjectMock2))._selectors(),_st(oldClass)._selectors());
684
+ _st(self)._assert_equals_(_st((smalltalk.ObjectMock2 || ObjectMock2))._comment(),_st(oldClass)._comment());
685
+ _st(self)._assert_equals_(_st(_st((smalltalk.ObjectMock2 || ObjectMock2))._package())._name(),"Kernel-Tests");
686
+ _st(self)._deny_(_st(_st(instance)._class()).__eq_eq((smalltalk.ObjectMock2 || ObjectMock2)));
687
+ _st(self)._assert_equals_(_st(_st(instance)._class())._name(),"OldObjectMock2");
688
+ _st(self)._assert_(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_("OldObjectMock2"))._isNil());
689
+ _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removeClass_((smalltalk.ObjectMock2 || ObjectMock2));
690
+ return self}, function($ctx1) {$ctx1.fill(self,"testClassMigration",{instance:instance,oldClass:oldClass}, smalltalk.ClassBuilderTest)})},
691
+ args: [],
692
+ source: "testClassMigration\x0a\x09| instance oldClass |\x0a \x0a oldClass := builder copyClass: ObjectMock named: 'ObjectMock2'.\x0a instance := (Smalltalk current at: 'ObjectMock2') new.\x0a \x0a \x22Change the superclass of ObjectMock2\x22\x0a ObjectMock subclass: (Smalltalk current at: 'ObjectMock2')\x0a \x09instanceVariableNames: ''\x0a package: 'Kernel-Tests'.\x0a \x0a self deny: oldClass == ObjectMock2.\x0a \x0a\x09self assert: ObjectMock2 superclass == ObjectMock.\x0a\x09self assert: ObjectMock2 instanceVariableNames isEmpty.\x0a\x09self assert: ObjectMock2 selectors equals: oldClass selectors.\x0a self assert: ObjectMock2 comment equals: oldClass comment.\x0a self assert: ObjectMock2 package name equals: 'Kernel-Tests'.\x0a \x0a\x09self deny: instance class == ObjectMock2.\x0a self assert: instance class name equals: 'OldObjectMock2'.\x0a \x0a self assert: (Smalltalk current at: 'OldObjectMock2') isNil.\x0a \x0a Smalltalk current removeClass: ObjectMock2",
693
+ messageSends: ["copyClass:named:", "new", "at:", "current", "subclass:instanceVariableNames:package:", "deny:", "==", "assert:", "superclass", "isEmpty", "instanceVariableNames", "assert:equals:", "selectors", "comment", "name", "package", "class", "isNil", "removeClass:"],
694
+ referencedClasses: ["ObjectMock", "Smalltalk", "ObjectMock2"]
695
+ }),
696
+ smalltalk.ClassBuilderTest);
697
+
698
+ smalltalk.addMethod(
699
+ "_testClassMigrationWithClassInstanceVariables",
700
+ smalltalk.method({
701
+ selector: "testClassMigrationWithClassInstanceVariables",
702
+ category: 'running',
703
+ fn: function (){
704
+ var self=this;
705
+ return smalltalk.withContext(function($ctx1) {
706
+ _st(_st((smalltalk.ObjectMock2 || ObjectMock2))._class())._instanceVariableNames_("foo bar");
707
+ _st((smalltalk.ObjectMock || ObjectMock))._subclass_instanceVariableNames_package_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_("ObjectMock2"),"","Kernel-Tests");
708
+ _st(self)._assert_equals_(_st(_st((smalltalk.ObjectMock2 || ObjectMock2))._class())._instanceVariableNames(),["foo", "bar"]);
709
+ _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removeClass_((smalltalk.ObjectMock2 || ObjectMock2));
710
+ return self}, function($ctx1) {$ctx1.fill(self,"testClassMigrationWithClassInstanceVariables",{}, smalltalk.ClassBuilderTest)})},
711
+ args: [],
712
+ source: "testClassMigrationWithClassInstanceVariables\x0a \x0a builder copyClass: ObjectMock named: 'ObjectMock2'.\x0a ObjectMock2 class instanceVariableNames: 'foo bar'.\x0a \x0a \x22Change the superclass of ObjectMock2\x22\x0a ObjectMock subclass: (Smalltalk current at: 'ObjectMock2')\x0a \x09instanceVariableNames: ''\x0a package: 'Kernel-Tests'.\x0a \x0a self assert: ObjectMock2 class instanceVariableNames equals: #('foo' 'bar').\x0a \x0a Smalltalk current removeClass: ObjectMock2",
713
+ messageSends: ["copyClass:named:", "instanceVariableNames:", "class", "subclass:instanceVariableNames:package:", "at:", "current", "assert:equals:", "instanceVariableNames", "removeClass:"],
714
+ referencedClasses: ["ObjectMock", "ObjectMock2", "Smalltalk"]
715
+ }),
716
+ smalltalk.ClassBuilderTest);
717
+
718
+ smalltalk.addMethod(
719
+ "_testClassMigrationWithSubclasses",
720
+ smalltalk.method({
721
+ selector: "testClassMigrationWithSubclasses",
722
+ category: 'running',
723
+ fn: function (){
724
+ var self=this;
725
+ return smalltalk.withContext(function($ctx1) {
726
+ _st((smalltalk.ObjectMock2 || ObjectMock2))._subclass_instanceVariableNames_package_("ObjectMock3","","Kernel-Tests");
727
+ _st((smalltalk.ObjectMock3 || ObjectMock3))._subclass_instanceVariableNames_package_("ObjectMock4","","Kernel-Tests");
728
+ _st((smalltalk.ObjectMock || ObjectMock))._subclass_instanceVariableNames_package_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_("ObjectMock2"),"","Kernel-Tests");
729
+ _st(self)._assert_(_st(_st((smalltalk.ObjectMock || ObjectMock))._subclasses())._includes_((smalltalk.ObjectMock2 || ObjectMock2)));
730
+ _st(self)._assert_(_st(_st((smalltalk.ObjectMock2 || ObjectMock2))._subclasses())._includes_((smalltalk.ObjectMock3 || ObjectMock3)));
731
+ _st(self)._assert_(_st(_st((smalltalk.ObjectMock3 || ObjectMock3))._subclasses())._includes_((smalltalk.ObjectMock4 || ObjectMock4)));
732
+ _st(_st((smalltalk.ObjectMock || ObjectMock))._allSubclasses())._do_((function(each){
733
+ return smalltalk.withContext(function($ctx2) {
734
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
735
+ return self}, function($ctx1) {$ctx1.fill(self,"testClassMigrationWithSubclasses",{}, smalltalk.ClassBuilderTest)})},
736
+ args: [],
737
+ source: "testClassMigrationWithSubclasses\x0a \x0a builder copyClass: ObjectMock named: 'ObjectMock2'.\x0a ObjectMock2 subclass: 'ObjectMock3' instanceVariableNames: '' package: 'Kernel-Tests'.\x0a ObjectMock3 subclass: 'ObjectMock4' instanceVariableNames: '' package: 'Kernel-Tests'.\x0a \x0a \x22Change the superclass of ObjectMock2\x22\x0a ObjectMock subclass: (Smalltalk current at: 'ObjectMock2')\x0a \x09instanceVariableNames: ''\x0a package: 'Kernel-Tests'.\x0a \x0a self assert: (ObjectMock subclasses includes: ObjectMock2).\x0a self assert: (ObjectMock2 subclasses includes: ObjectMock3).\x0a self assert: (ObjectMock3 subclasses includes: ObjectMock4).\x0a \x0a ObjectMock allSubclasses do: [ :each | Smalltalk current removeClass: each ]",
738
+ messageSends: ["copyClass:named:", "subclass:instanceVariableNames:package:", "at:", "current", "assert:", "includes:", "subclasses", "do:", "removeClass:", "allSubclasses"],
739
+ referencedClasses: ["ObjectMock", "ObjectMock2", "ObjectMock3", "Smalltalk", "ObjectMock4"]
740
+ }),
741
+ smalltalk.ClassBuilderTest);
742
+
497
743
  smalltalk.addMethod(
498
744
  "_testInstanceVariableNames",
499
745
  smalltalk.method({
@@ -501,8 +747,8 @@ selector: "testInstanceVariableNames",
501
747
  category: 'running',
502
748
  fn: function (){
503
749
  var self=this;
504
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(self["@builder"],"_instanceVariableNamesFor_",[" hello world "]),["hello", "world"]]);
505
- return self},
750
+ return smalltalk.withContext(function($ctx1) {
751
+ return self}, function($ctx1) {$ctx1.fill(self,"testInstanceVariableNames",{}, smalltalk.ClassBuilderTest)})},
506
752
  args: [],
507
753
  source: "testInstanceVariableNames\x0a\x09self assert: (builder instanceVariableNamesFor: ' hello world ') equals: #('hello' 'world')",
508
754
  messageSends: ["assert:equals:", "instanceVariableNamesFor:"],
@@ -520,11 +766,11 @@ selector: "assertSameContents:as:",
520
766
  category: 'convenience',
521
767
  fn: function (aCollection,anotherCollection){
522
768
  var self=this;
523
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(aCollection,"_size",[]),"__eq",[smalltalk.send(anotherCollection,"_size",[])])]);
524
- smalltalk.send(aCollection,"_do_",[(function(each){
525
- return smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(aCollection,"_occurrencesOf_",[each]),"__eq",[smalltalk.send(anotherCollection,"_occurrencesOf_",[each])])]);
526
- })]);
527
- return self},
769
+ return smalltalk.withContext(function($ctx1) {
770
+ _st(aCollection)._do_((function(each){
771
+ return smalltalk.withContext(function($ctx2) {
772
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
773
+ return self}, function($ctx1) {$ctx1.fill(self,"assertSameContents:as:",{aCollection:aCollection,anotherCollection:anotherCollection}, smalltalk.CollectionTest)})},
528
774
  args: ["aCollection", "anotherCollection"],
529
775
  source: "assertSameContents: aCollection \x09as: anotherCollection\x0a\x09self assert: aCollection size = anotherCollection size.\x0a\x09aCollection do: [ :each |\x0a\x09\x09self assert: (aCollection occurrencesOf: each) = (anotherCollection occurrencesOf: each) ]",
530
776
  messageSends: ["assert:", "=", "size", "do:", "occurrencesOf:"],
@@ -539,10 +785,10 @@ selector: "collection",
539
785
  category: 'accessing',
540
786
  fn: function (){
541
787
  var self=this;
542
- var $1;
543
- $1=smalltalk.send(smalltalk.send(self,"_collectionClass",[]),"_withAll_",[smalltalk.send(self,"_defaultValues",[])]);
788
+ return smalltalk.withContext(function($ctx1) {
789
+ $1=_st(_st(self)._collectionClass())._withAll_(_st(self)._defaultValues());
544
790
  return $1;
545
- },
791
+ }, function($ctx1) {$ctx1.fill(self,"collection",{}, smalltalk.CollectionTest)})},
546
792
  args: [],
547
793
  source: "collection\x0a\x09^ self collectionClass withAll: self defaultValues",
548
794
  messageSends: ["withAll:", "defaultValues", "collectionClass"],
@@ -557,10 +803,10 @@ selector: "collectionClass",
557
803
  category: 'accessing',
558
804
  fn: function (){
559
805
  var self=this;
560
- var $1;
561
- $1=smalltalk.send(smalltalk.send(self,"_class",[]),"_collectionClass",[]);
806
+ return smalltalk.withContext(function($ctx1) {
807
+ $1=_st(_st(self)._class())._collectionClass();
562
808
  return $1;
563
- },
809
+ }, function($ctx1) {$ctx1.fill(self,"collectionClass",{}, smalltalk.CollectionTest)})},
564
810
  args: [],
565
811
  source: "collectionClass\x0a\x09^ self class collectionClass",
566
812
  messageSends: ["collectionClass", "class"],
@@ -575,10 +821,10 @@ selector: "collectionWithDuplicates",
575
821
  category: 'accessing',
576
822
  fn: function (){
577
823
  var self=this;
578
- var $1;
579
- $1=smalltalk.send(smalltalk.send(self,"_collectionClass",[]),"_withAll_",[["a", "b", "c", (1), (2), (1), "a"]]);
824
+ return smalltalk.withContext(function($ctx1) {
825
+ $1=_st(_st(self)._collectionClass())._withAll_(["a", "b", "c", (1), (2), (1), "a"]);
580
826
  return $1;
581
- },
827
+ }, function($ctx1) {$ctx1.fill(self,"collectionWithDuplicates",{}, smalltalk.CollectionTest)})},
582
828
  args: [],
583
829
  source: "collectionWithDuplicates\x0a\x09^ self collectionClass withAll: #('a' 'b' 'c' 1 2 1 'a')",
584
830
  messageSends: ["withAll:", "collectionClass"],
@@ -593,8 +839,8 @@ selector: "defaultValues",
593
839
  category: 'accessing',
594
840
  fn: function (){
595
841
  var self=this;
596
- return [(1), (2), (3), (-4)];
597
- },
842
+ return smalltalk.withContext(function($ctx1) {
843
+ }, function($ctx1) {$ctx1.fill(self,"defaultValues",{}, smalltalk.CollectionTest)})},
598
844
  args: [],
599
845
  source: "defaultValues\x0a\x09^ #(1 2 3 -4)",
600
846
  messageSends: [],
@@ -609,8 +855,8 @@ selector: "isCollectionReadOnly",
609
855
  category: 'testing',
610
856
  fn: function (){
611
857
  var self=this;
612
- return false;
613
- },
858
+ return smalltalk.withContext(function($ctx1) {
859
+ }, function($ctx1) {$ctx1.fill(self,"isCollectionReadOnly",{}, smalltalk.CollectionTest)})},
614
860
  args: [],
615
861
  source: "isCollectionReadOnly\x0a\x09^ false",
616
862
  messageSends: [],
@@ -625,8 +871,8 @@ selector: "testAsArray",
625
871
  category: 'tests',
626
872
  fn: function (){
627
873
  var self=this;
628
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(self,"_collection",[]),smalltalk.send(smalltalk.send(self,"_collection",[]),"_asArray",[])]);
629
- return self},
874
+ return smalltalk.withContext(function($ctx1) {
875
+ return self}, function($ctx1) {$ctx1.fill(self,"testAsArray",{}, smalltalk.CollectionTest)})},
630
876
  args: [],
631
877
  source: "testAsArray\x0a\x09self \x0a\x09\x09assertSameContents: self collection \x0a\x09\x09as: self collection asArray",
632
878
  messageSends: ["assertSameContents:as:", "collection", "asArray"],
@@ -641,8 +887,8 @@ selector: "testAsOrderedCollection",
641
887
  category: 'tests',
642
888
  fn: function (){
643
889
  var self=this;
644
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(self,"_collection",[]),smalltalk.send(smalltalk.send(self,"_collection",[]),"_asOrderedCollection",[])]);
645
- return self},
890
+ return smalltalk.withContext(function($ctx1) {
891
+ return self}, function($ctx1) {$ctx1.fill(self,"testAsOrderedCollection",{}, smalltalk.CollectionTest)})},
646
892
  args: [],
647
893
  source: "testAsOrderedCollection\x0a\x09self \x0a\x09\x09assertSameContents: self collection \x0a\x09\x09as: self collection asOrderedCollection",
648
894
  messageSends: ["assertSameContents:as:", "collection", "asOrderedCollection"],
@@ -657,15 +903,14 @@ selector: "testAsSet",
657
903
  category: 'tests',
658
904
  fn: function (){
659
905
  var self=this;
660
- var c;
661
- var set;
662
- c=smalltalk.send(self,"_collectionWithDuplicates",[]);
663
- set=smalltalk.send(c,"_asSet",[]);
664
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(set,"_size",[]),"__eq",[(5)])]);
665
- smalltalk.send(c,"_do_",[(function(each){
666
- return smalltalk.send(self,"_assert_",[smalltalk.send(set,"_includes_",[each])]);
667
- })]);
668
- return self},
906
+ var c,set;
907
+ return smalltalk.withContext(function($ctx1) {
908
+ set=_st(c)._asSet();
909
+ _st(self)._assert_(_st(_st(set)._size()).__eq((5)));
910
+ _st(c)._do_((function(each){
911
+ return smalltalk.withContext(function($ctx2) {
912
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
913
+ return self}, function($ctx1) {$ctx1.fill(self,"testAsSet",{c:c,set:set}, smalltalk.CollectionTest)})},
669
914
  args: [],
670
915
  source: "testAsSet\x0a\x09| c set |\x0a\x09c := self collectionWithDuplicates.\x0a\x09set := c asSet.\x0a\x09self assert: set size = 5.\x0a\x09c do: [ :each |\x0a\x09\x09self assert: (set includes: each) ]",
671
916
  messageSends: ["collectionWithDuplicates", "asSet", "assert:", "=", "size", "do:", "includes:"],
@@ -681,11 +926,11 @@ category: 'tests',
681
926
  fn: function (){
682
927
  var self=this;
683
928
  var newCollection;
684
- newCollection=[(1), (2), (3), (4)];
685
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_collect_",[(function(each){
686
- return smalltalk.send(each,"_abs",[]);
687
- })]),newCollection]);
688
- return self},
929
+ return smalltalk.withContext(function($ctx1) {
930
+ _st(self)._assertSameContents_as_(_st(_st(self)._collection())._collect_((function(each){
931
+ return smalltalk.withContext(function($ctx2) {
932
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})),newCollection);
933
+ return self}, function($ctx1) {$ctx1.fill(self,"testCollect",{newCollection:newCollection}, smalltalk.CollectionTest)})},
689
934
  args: [],
690
935
  source: "testCollect\x0a\x09| newCollection |\x0a\x09newCollection := #(1 2 3 4).\x0a\x09self \x0a\x09\x09assertSameContents: (self collection collect: [ :each |\x0a\x09\x09\x09each abs ])\x0a\x09\x09as: newCollection",
691
936
  messageSends: ["assertSameContents:as:", "collect:", "abs", "collection"],
@@ -700,15 +945,15 @@ selector: "testDetect",
700
945
  category: 'tests',
701
946
  fn: function (){
702
947
  var self=this;
703
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_detect_",[(function(each){
704
- return smalltalk.send(each,"__lt",[(0)]);
705
- })]),"__eq",[(-4)])]);
706
- smalltalk.send(self,"_should_raise_",[(function(){
707
- return smalltalk.send(smalltalk.send(self,"_collection",[]),"_detect_",[(function(each){
708
- return smalltalk.send(each,"__eq",[(6)]);
709
- })]);
710
- }),(smalltalk.Error || Error)]);
711
- return self},
948
+ return smalltalk.withContext(function($ctx1) {
949
+ return smalltalk.withContext(function($ctx2) {
950
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}))).__eq((-4)));
951
+ _st(self)._should_raise_((function(){
952
+ return smalltalk.withContext(function($ctx2) {
953
+ return smalltalk.withContext(function($ctx3) {
954
+ }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
955
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
956
+ return self}, function($ctx1) {$ctx1.fill(self,"testDetect",{}, smalltalk.CollectionTest)})},
712
957
  args: [],
713
958
  source: "testDetect\x0a\x09self assert: (self collection detect: [ :each | each < 0 ]) = -4.\x0a\x09self \x0a\x09\x09should: [ self collection detect: [ :each | each = 6 ] ]\x0a\x09\x09raise: Error",
714
959
  messageSends: ["assert:", "=", "detect:", "<", "collection", "should:raise:"],
@@ -724,12 +969,12 @@ category: 'tests',
724
969
  fn: function (){
725
970
  var self=this;
726
971
  var newCollection;
727
- newCollection=smalltalk.send((smalltalk.OrderedCollection || OrderedCollection),"_new",[]);
728
- smalltalk.send(smalltalk.send(self,"_collection",[]),"_do_",[(function(each){
729
- return smalltalk.send(newCollection,"_add_",[each]);
730
- })]);
731
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(self,"_collection",[]),newCollection]);
732
- return self},
972
+ return smalltalk.withContext(function($ctx1) {
973
+ _st(_st(self)._collection())._do_((function(each){
974
+ return smalltalk.withContext(function($ctx2) {
975
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
976
+ _st(self)._assertSameContents_as_(_st(self)._collection(),newCollection);
977
+ return self}, function($ctx1) {$ctx1.fill(self,"testDo",{newCollection:newCollection}, smalltalk.CollectionTest)})},
733
978
  args: [],
734
979
  source: "testDo\x0a\x09| newCollection |\x0a\x09newCollection := OrderedCollection new.\x0a\x09self collection do: [ :each |\x0a\x09\x09newCollection add: each ].\x0a\x09self \x0a\x09\x09assertSameContents: self collection \x0a\x09\x09as: newCollection",
735
980
  messageSends: ["new", "do:", "add:", "collection", "assertSameContents:as:"],
@@ -744,9 +989,9 @@ selector: "testIsEmpty",
744
989
  category: 'tests',
745
990
  fn: function (){
746
991
  var self=this;
747
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_collectionClass",[]),"_new",[]),"_isEmpty",[])]);
748
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_isEmpty",[])]);
749
- return self},
992
+ return smalltalk.withContext(function($ctx1) {
993
+ _st(self)._deny_(_st(_st(self)._collection())._isEmpty());
994
+ return self}, function($ctx1) {$ctx1.fill(self,"testIsEmpty",{}, smalltalk.CollectionTest)})},
750
995
  args: [],
751
996
  source: "testIsEmpty\x0a\x09self assert: self collectionClass new isEmpty.\x0a\x09self deny: self collection isEmpty",
752
997
  messageSends: ["assert:", "isEmpty", "new", "collectionClass", "deny:", "collection"],
@@ -762,11 +1007,11 @@ category: 'tests',
762
1007
  fn: function (){
763
1008
  var self=this;
764
1009
  var newCollection;
765
- newCollection=[(2), (-4)];
766
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_select_",[(function(each){
767
- return smalltalk.send(each,"_even",[]);
768
- })]),newCollection]);
769
- return self},
1010
+ return smalltalk.withContext(function($ctx1) {
1011
+ _st(self)._assertSameContents_as_(_st(_st(self)._collection())._select_((function(each){
1012
+ return smalltalk.withContext(function($ctx2) {
1013
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})),newCollection);
1014
+ return self}, function($ctx1) {$ctx1.fill(self,"testSelect",{newCollection:newCollection}, smalltalk.CollectionTest)})},
770
1015
  args: [],
771
1016
  source: "testSelect\x0a\x09| newCollection |\x0a\x09newCollection := #(2 -4).\x0a\x09self \x0a\x09\x09assertSameContents: (self collection select: [ :each |\x0a\x09\x09\x09each even ])\x0a\x09\x09as: newCollection",
772
1017
  messageSends: ["assertSameContents:as:", "select:", "even", "collection"],
@@ -781,9 +1026,9 @@ selector: "testSize",
781
1026
  category: 'tests',
782
1027
  fn: function (){
783
1028
  var self=this;
784
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_collectionClass",[]),"_new",[]),"_size",[]),"__eq",[(0)])]);
785
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_size",[]),"__eq",[(4)])]);
786
- return self},
1029
+ return smalltalk.withContext(function($ctx1) {
1030
+ _st(self)._assert_(_st(_st(_st(self)._collection())._size()).__eq((4)));
1031
+ return self}, function($ctx1) {$ctx1.fill(self,"testSize",{}, smalltalk.CollectionTest)})},
787
1032
  args: [],
788
1033
  source: "testSize\x0a\x09self assert: self collectionClass new size = 0.\x0a\x09self assert: self collection size = 4",
789
1034
  messageSends: ["assert:", "=", "size", "new", "collectionClass", "collection"],
@@ -799,8 +1044,8 @@ selector: "collectionClass",
799
1044
  category: 'accessing',
800
1045
  fn: function (){
801
1046
  var self=this;
802
- return nil;
803
- },
1047
+ return smalltalk.withContext(function($ctx1) {
1048
+ }, function($ctx1) {$ctx1.fill(self,"collectionClass",{}, smalltalk.CollectionTest.klass)})},
804
1049
  args: [],
805
1050
  source: "collectionClass\x0a\x09^ nil",
806
1051
  messageSends: [],
@@ -815,10 +1060,10 @@ selector: "isAbstract",
815
1060
  category: 'testing',
816
1061
  fn: function (){
817
1062
  var self=this;
818
- var $1;
819
- $1=smalltalk.send(smalltalk.send(self,"_collectionClass",[]),"_isNil",[]);
1063
+ return smalltalk.withContext(function($ctx1) {
1064
+ $1=_st(_st(self)._collectionClass())._isNil();
820
1065
  return $1;
821
- },
1066
+ }, function($ctx1) {$ctx1.fill(self,"isAbstract",{}, smalltalk.CollectionTest.klass)})},
822
1067
  args: [],
823
1068
  source: "isAbstract\x0a\x09^ self collectionClass isNil",
824
1069
  messageSends: ["isNil", "collectionClass"],
@@ -835,10 +1080,10 @@ selector: "collection",
835
1080
  category: 'accessing',
836
1081
  fn: function (){
837
1082
  var self=this;
838
- var $1;
839
- $1=smalltalk.HashedCollection._fromPairs_([smalltalk.send("a","__minus_gt",[(1)]),smalltalk.send("b","__minus_gt",[(2)]),smalltalk.send("c","__minus_gt",[(3)]),smalltalk.send("d","__minus_gt",[(-4)])]);
1083
+ return smalltalk.withContext(function($ctx1) {
1084
+ $1=smalltalk.HashedCollection._fromPairs_([_st("a").__minus_gt((1)),_st("b").__minus_gt((2)),_st("c").__minus_gt((3)),_st("d").__minus_gt((-4))]);
840
1085
  return $1;
841
- },
1086
+ }, function($ctx1) {$ctx1.fill(self,"collection",{}, smalltalk.HashedCollectionTest)})},
842
1087
  args: [],
843
1088
  source: "collection\x0a\x09^ #{ 'a' -> 1. 'b' -> 2. 'c' -> 3. 'd' -> -4 }",
844
1089
  messageSends: ["->"],
@@ -853,10 +1098,10 @@ selector: "collectionWithDuplicates",
853
1098
  category: 'accessing',
854
1099
  fn: function (){
855
1100
  var self=this;
856
- var $1;
857
- $1=smalltalk.HashedCollection._fromPairs_([smalltalk.send("a","__minus_gt",[(1)]),smalltalk.send("b","__minus_gt",[(2)]),smalltalk.send("c","__minus_gt",[(3)]),smalltalk.send("d","__minus_gt",[(-4)]),smalltalk.send("e","__minus_gt",[(1)]),smalltalk.send("f","__minus_gt",[(2)]),smalltalk.send("g","__minus_gt",[(10)])]);
1101
+ return smalltalk.withContext(function($ctx1) {
1102
+ $1=smalltalk.HashedCollection._fromPairs_([_st("a").__minus_gt((1)),_st("b").__minus_gt((2)),_st("c").__minus_gt((3)),_st("d").__minus_gt((-4)),_st("e").__minus_gt((1)),_st("f").__minus_gt((2)),_st("g").__minus_gt((10))]);
858
1103
  return $1;
859
- },
1104
+ }, function($ctx1) {$ctx1.fill(self,"collectionWithDuplicates",{}, smalltalk.HashedCollectionTest)})},
860
1105
  args: [],
861
1106
  source: "collectionWithDuplicates\x0a\x09^ #{ 'a' -> 1. 'b' -> 2. 'c' -> 3. 'd' -> -4. 'e' -> 1. 'f' -> 2. 'g' -> 10 }",
862
1107
  messageSends: ["->"],
@@ -872,8 +1117,10 @@ selector: "collectionClass",
872
1117
  category: 'accessing',
873
1118
  fn: function (){
874
1119
  var self=this;
875
- return (smalltalk.HashedCollection || HashedCollection);
876
- },
1120
+ return smalltalk.withContext(function($ctx1) {
1121
+ $1=(smalltalk.HashedCollection || HashedCollection);
1122
+ return $1;
1123
+ }, function($ctx1) {$ctx1.fill(self,"collectionClass",{}, smalltalk.HashedCollectionTest.klass)})},
877
1124
  args: [],
878
1125
  source: "collectionClass\x0a\x09^ HashedCollection",
879
1126
  messageSends: [],
@@ -890,16 +1137,16 @@ selector: "collection",
890
1137
  category: 'accessing',
891
1138
  fn: function (){
892
1139
  var self=this;
893
- var $2,$3,$1;
894
- $2=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
895
- smalltalk.send($2,"_at_put_",[(1),(1)]);
896
- smalltalk.send($2,"_at_put_",["a",(2)]);
897
- smalltalk.send($2,"_at_put_",[true,(3)]);
898
- smalltalk.send($2,"_at_put_",[(4),(-4)]);
899
- $3=smalltalk.send($2,"_yourself",[]);
1140
+ return smalltalk.withContext(function($ctx1) {
1141
+ $2=_st((smalltalk.Dictionary || Dictionary))._new();
1142
+ _st($2)._at_put_((1),(1));
1143
+ _st($2)._at_put_("a",(2));
1144
+ _st($2)._at_put_(true,(3));
1145
+ _st($2)._at_put_((4),(-4));
1146
+ $3=_st($2)._yourself();
900
1147
  $1=$3;
901
1148
  return $1;
902
- },
1149
+ }, function($ctx1) {$ctx1.fill(self,"collection",{}, smalltalk.DictionaryTest)})},
903
1150
  args: [],
904
1151
  source: "collection\x0a\x09^ Dictionary new\x0a\x09\x09at: 1 put: 1;\x0a\x09\x09at: 'a' put: 2;\x0a\x09\x09at: true put: 3;\x0a\x09\x09at: 4 put: -4;\x0a\x09\x09yourself",
905
1152
  messageSends: ["at:put:", "new", "yourself"],
@@ -914,19 +1161,19 @@ selector: "collectionWithDuplicates",
914
1161
  category: 'accessing',
915
1162
  fn: function (){
916
1163
  var self=this;
917
- var $2,$3,$1;
918
- $2=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
919
- smalltalk.send($2,"_at_put_",[(1),(1)]);
920
- smalltalk.send($2,"_at_put_",["a",(2)]);
921
- smalltalk.send($2,"_at_put_",[true,(3)]);
922
- smalltalk.send($2,"_at_put_",[(4),(-4)]);
923
- smalltalk.send($2,"_at_put_",["b",(1)]);
924
- smalltalk.send($2,"_at_put_",[(3),(3)]);
925
- smalltalk.send($2,"_at_put_",[false,(12)]);
926
- $3=smalltalk.send($2,"_yourself",[]);
1164
+ return smalltalk.withContext(function($ctx1) {
1165
+ $2=_st((smalltalk.Dictionary || Dictionary))._new();
1166
+ _st($2)._at_put_((1),(1));
1167
+ _st($2)._at_put_("a",(2));
1168
+ _st($2)._at_put_(true,(3));
1169
+ _st($2)._at_put_((4),(-4));
1170
+ _st($2)._at_put_("b",(1));
1171
+ _st($2)._at_put_((3),(3));
1172
+ _st($2)._at_put_(false,(12));
1173
+ $3=_st($2)._yourself();
927
1174
  $1=$3;
928
1175
  return $1;
929
- },
1176
+ }, function($ctx1) {$ctx1.fill(self,"collectionWithDuplicates",{}, smalltalk.DictionaryTest)})},
930
1177
  args: [],
931
1178
  source: "collectionWithDuplicates\x0a\x09^ Dictionary new\x0a\x09\x09at: 1 put: 1;\x0a\x09\x09at: 'a' put: 2;\x0a\x09\x09at: true put: 3;\x0a\x09\x09at: 4 put: -4;\x0a\x09\x09at: 'b' put: 1;\x0a\x09\x09at: 3 put: 3;\x0a\x09\x09at: false put: 12;\x0a\x09\x09yourself",
932
1179
  messageSends: ["at:put:", "new", "yourself"],
@@ -942,20 +1189,20 @@ category: 'tests',
942
1189
  fn: function (){
943
1190
  var self=this;
944
1191
  var d;
945
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
946
- smalltalk.send(d,"_at_put_",["hello","world"]);
947
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_at_",["hello"]),"__eq",["world"])]);
948
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_at_ifAbsent_",["hello",(function(){
949
- return nil;
950
- })]),"__eq",["world"])]);
951
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(d,"_at_ifAbsent_",["foo",(function(){
952
- return nil;
953
- })]),"__eq",["world"])]);
954
- smalltalk.send(d,"_at_put_",[(1),(2)]);
955
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_at_",[(1)]),"__eq",[(2)])]);
956
- smalltalk.send(d,"_at_put_",[smalltalk.send((1),"__at",[(3)]),(3)]);
957
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_at_",[smalltalk.send((1),"__at",[(3)])]),"__eq",[(3)])]);
958
- return self},
1192
+ return smalltalk.withContext(function($ctx1) {
1193
+ _st(d)._at_put_("hello","world");
1194
+ _st(self)._assert_(_st(_st(d)._at_("hello")).__eq("world"));
1195
+ _st(self)._assert_(_st(_st(d)._at_ifAbsent_("hello",(function(){
1196
+ return smalltalk.withContext(function($ctx2) {
1197
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq("world"));
1198
+ _st(self)._deny_(_st(_st(d)._at_ifAbsent_("foo",(function(){
1199
+ return smalltalk.withContext(function($ctx2) {
1200
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq("world"));
1201
+ _st(d)._at_put_((1),(2));
1202
+ _st(self)._assert_(_st(_st(d)._at_((1))).__eq((2)));
1203
+ _st(d)._at_put_(_st((1)).__at((3)),(3));
1204
+ _st(self)._assert_(_st(_st(d)._at_(_st((1)).__at((3)))).__eq((3)));
1205
+ return self}, function($ctx1) {$ctx1.fill(self,"testAccessing",{d:d}, smalltalk.DictionaryTest)})},
959
1206
  args: [],
960
1207
  source: "testAccessing\x0a\x09| d |\x0a\x0a\x09d := Dictionary new.\x0a\x0a\x09d at: 'hello' put: 'world'.\x0a\x09self assert: (d at: 'hello') = 'world'.\x0a\x09self assert: (d at: 'hello' ifAbsent: [nil]) = 'world'.\x0a\x09self deny: (d at: 'foo' ifAbsent: [nil]) = 'world'.\x0a\x0a\x09d at: 1 put: 2.\x0a\x09self assert: (d at: 1) = 2.\x0a\x0a\x09d at: 1@3 put: 3.\x0a\x09self assert: (d at: 1@3) = 3",
961
1208
  messageSends: ["new", "at:put:", "assert:", "=", "at:", "at:ifAbsent:", "deny:", "@"],
@@ -970,8 +1217,8 @@ selector: "testDynamicDictionaries",
970
1217
  category: 'tests',
971
1218
  fn: function (){
972
1219
  var self=this;
973
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.HashedCollection._fromPairs_([smalltalk.send("hello","__minus_gt",[(1)])]),"_asDictionary",[]),"__eq",[smalltalk.send((smalltalk.Dictionary || Dictionary),"_with_",[smalltalk.send("hello","__minus_gt",[(1)])])])]);
974
- return self},
1220
+ return smalltalk.withContext(function($ctx1) {
1221
+ return self}, function($ctx1) {$ctx1.fill(self,"testDynamicDictionaries",{}, smalltalk.DictionaryTest)})},
975
1222
  args: [],
976
1223
  source: "testDynamicDictionaries\x0a\x09self assert: #{'hello' -> 1} asDictionary = (Dictionary with: 'hello' -> 1)",
977
1224
  messageSends: ["assert:", "=", "with:", "->", "asDictionary"],
@@ -986,36 +1233,35 @@ selector: "testEquality",
986
1233
  category: 'tests',
987
1234
  fn: function (){
988
1235
  var self=this;
989
- var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
990
- var d1;
991
- var d2;
992
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]),"__eq",[smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[])])]);
993
- $1=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
994
- smalltalk.send($1,"_at_put_",[(1),(2)]);
995
- $2=smalltalk.send($1,"_yourself",[]);
1236
+ var d1,d2;
1237
+ return smalltalk.withContext(function($ctx1) {
1238
+ _st(self)._assert_(_st(_st((smalltalk.Dictionary || Dictionary))._new()).__eq(_st((smalltalk.Dictionary || Dictionary))._new()));
1239
+ $1=_st((smalltalk.Dictionary || Dictionary))._new();
1240
+ _st($1)._at_put_((1),(2));
1241
+ $2=_st($1)._yourself();
996
1242
  d1=$2;
997
- $3=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
998
- smalltalk.send($3,"_at_put_",[(1),(2)]);
999
- $4=smalltalk.send($3,"_yourself",[]);
1243
+ $3=_st((smalltalk.Dictionary || Dictionary))._new();
1244
+ _st($3)._at_put_((1),(2));
1245
+ $4=_st($3)._yourself();
1000
1246
  d2=$4;
1001
- smalltalk.send(self,"_assert_",[smalltalk.send(d1,"__eq",[d2])]);
1002
- $5=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1003
- smalltalk.send($5,"_at_put_",[(1),(3)]);
1004
- $6=smalltalk.send($5,"_yourself",[]);
1247
+ _st(self)._assert_(_st(d1).__eq(d2));
1248
+ $5=_st((smalltalk.Dictionary || Dictionary))._new();
1249
+ _st($5)._at_put_((1),(3));
1250
+ $6=_st($5)._yourself();
1005
1251
  d2=$6;
1006
- smalltalk.send(self,"_deny_",[smalltalk.send(d1,"__eq",[d2])]);
1007
- $7=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1008
- smalltalk.send($7,"_at_put_",[(2),(2)]);
1009
- $8=smalltalk.send($7,"_yourself",[]);
1252
+ _st(self)._deny_(_st(d1).__eq(d2));
1253
+ $7=_st((smalltalk.Dictionary || Dictionary))._new();
1254
+ _st($7)._at_put_((2),(2));
1255
+ $8=_st($7)._yourself();
1010
1256
  d2=$8;
1011
- smalltalk.send(self,"_deny_",[smalltalk.send(d1,"__eq",[d2])]);
1012
- $9=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1013
- smalltalk.send($9,"_at_put_",[(1),(2)]);
1014
- smalltalk.send($9,"_at_put_",[(3),(4)]);
1015
- $10=smalltalk.send($9,"_yourself",[]);
1257
+ _st(self)._deny_(_st(d1).__eq(d2));
1258
+ $9=_st((smalltalk.Dictionary || Dictionary))._new();
1259
+ _st($9)._at_put_((1),(2));
1260
+ _st($9)._at_put_((3),(4));
1261
+ $10=_st($9)._yourself();
1016
1262
  d2=$10;
1017
- smalltalk.send(self,"_deny_",[smalltalk.send(d1,"__eq",[d2])]);
1018
- return self},
1263
+ _st(self)._deny_(_st(d1).__eq(d2));
1264
+ return self}, function($ctx1) {$ctx1.fill(self,"testEquality",{d1:d1,d2:d2}, smalltalk.DictionaryTest)})},
1019
1265
  args: [],
1020
1266
  source: "testEquality\x0a\x09| d1 d2 |\x0a\x0a\x09self assert: Dictionary new = Dictionary new.\x0a\x09\x09\x0a\x09d1 := Dictionary new at: 1 put: 2; yourself.\x0a\x09d2 := Dictionary new at: 1 put: 2; yourself.\x0a\x09self assert: d1 = d2.\x0a\x0a\x09d2 := Dictionary new at: 1 put: 3; yourself.\x0a\x09self deny: d1 = d2.\x0a\x0a\x09d2 := Dictionary new at: 2 put: 2; yourself.\x0a\x09self deny: d1 = d2.\x0a\x0a\x09d2 := Dictionary new at: 1 put: 2; at: 3 put: 4; yourself.\x0a\x09self deny: d1 = d2.",
1021
1267
  messageSends: ["assert:", "=", "new", "at:put:", "yourself", "deny:"],
@@ -1030,16 +1276,15 @@ selector: "testIfAbsent",
1030
1276
  category: 'tests',
1031
1277
  fn: function (){
1032
1278
  var self=this;
1033
- var d;
1034
- var visited;
1035
- visited=false;
1036
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1037
- smalltalk.send(d,"_at_ifAbsent_",["hello",(function(){
1038
- visited=true;
1279
+ var d,visited;
1280
+ return smalltalk.withContext(function($ctx1) {
1281
+ d=_st((smalltalk.Dictionary || Dictionary))._new();
1282
+ _st(d)._at_ifAbsent_("hello",(function(){
1283
+ return smalltalk.withContext(function($ctx2) {
1039
1284
  return visited;
1040
- })]);
1041
- smalltalk.send(self,"_assert_",[visited]);
1042
- return self},
1285
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
1286
+ _st(self)._assert_(visited);
1287
+ return self}, function($ctx1) {$ctx1.fill(self,"testIfAbsent",{d:d,visited:visited}, smalltalk.DictionaryTest)})},
1043
1288
  args: [],
1044
1289
  source: "testIfAbsent\x0a\x0a\x09| d visited |\x0a\x09visited := false.\x0a\x09d := Dictionary new.\x0a\x0a\x09d at: 'hello' ifAbsent: [ visited := true ].\x0a\x09self assert: visited.",
1045
1290
  messageSends: ["new", "at:ifAbsent:", "assert:"],
@@ -1054,25 +1299,23 @@ selector: "testIfPresent",
1054
1299
  category: 'tests',
1055
1300
  fn: function (){
1056
1301
  var self=this;
1057
- var d;
1058
- var visited;
1059
- var absent;
1060
- visited=false;
1061
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1062
- smalltalk.send(d,"_at_put_",["hello","world"]);
1063
- smalltalk.send(d,"_at_ifPresent_",["hello",(function(value){
1064
- visited=value;
1302
+ var d,visited,absent;
1303
+ return smalltalk.withContext(function($ctx1) {
1304
+ d=_st((smalltalk.Dictionary || Dictionary))._new();
1305
+ _st(d)._at_put_("hello","world");
1306
+ _st(d)._at_ifPresent_("hello",(function(value){
1307
+ return smalltalk.withContext(function($ctx2) {
1065
1308
  return visited;
1066
- })]);
1067
- smalltalk.send(self,"_assert_",[smalltalk.send(visited,"__eq",["world"])]);
1068
- absent=smalltalk.send(d,"_at_ifPresent_",["bye",(function(value){
1069
- visited=value;
1309
+ }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
1310
+ _st(self)._assert_(_st(visited).__eq("world"));
1311
+ absent=_st(d)._at_ifPresent_("bye",(function(value){
1312
+ return smalltalk.withContext(function($ctx2) {
1070
1313
  return visited;
1071
- })]);
1072
- smalltalk.send(self,"_assert_",[smalltalk.send(absent,"_isNil",[])]);
1073
- return self},
1314
+ }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}));
1315
+ _st(self)._assert_(_st(absent)._isNil());
1316
+ return self}, function($ctx1) {$ctx1.fill(self,"testIfPresent",{d:d,visited:visited,absent:absent}, smalltalk.DictionaryTest)})},
1074
1317
  args: [],
1075
- source: "testIfPresent\x0a\x0a\x09| d visited absent |\x0a\x09visited := false.\x0a\x09d := Dictionary new.\x0a\x09d at: 'hello' put: 'world'.\x0a\x0a\x09d at: 'hello' ifPresent: [ :value | visited := value ].\x0a\x09self assert: visited = 'world'.\x0a\x0a\x09absent := d at: 'bye' ifPresent: [ :value | visited := value ].\x0a\x09self assert: absent isNil.\x0a",
1318
+ source: "testIfPresent\x0a\x0a\x09| d visited absent |\x0a\x09visited := false.\x0a\x09d := Dictionary new.\x0a\x09d at: 'hello' put: 'world'.\x0a\x0a\x09d at: 'hello' ifPresent: [ :value | visited := value ].\x0a\x09self assert: visited = 'world'.\x0a\x0a\x09absent := d at: 'bye' ifPresent: [ :value | visited := value ].\x0a\x09self assert: absent isNil.",
1076
1319
  messageSends: ["new", "at:put:", "at:ifPresent:", "assert:", "=", "isNil"],
1077
1320
  referencedClasses: ["Dictionary"]
1078
1321
  }),
@@ -1085,28 +1328,27 @@ selector: "testIfPresentIfAbsent",
1085
1328
  category: 'tests',
1086
1329
  fn: function (){
1087
1330
  var self=this;
1088
- var d;
1089
- var visited;
1090
- visited=false;
1091
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1092
- smalltalk.send(d,"_at_put_",["hello","world"]);
1093
- smalltalk.send(d,"_at_ifPresent_ifAbsent_",["hello",(function(value){
1094
- visited=value;
1331
+ var d,visited;
1332
+ return smalltalk.withContext(function($ctx1) {
1333
+ d=_st((smalltalk.Dictionary || Dictionary))._new();
1334
+ _st(d)._at_put_("hello","world");
1335
+ _st(d)._at_ifPresent_ifAbsent_("hello",(function(value){
1336
+ return smalltalk.withContext(function($ctx2) {
1095
1337
  return visited;
1096
- }),(function(){
1097
- visited=true;
1338
+ }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}),(function(){
1339
+ return smalltalk.withContext(function($ctx2) {
1098
1340
  return visited;
1099
- })]);
1100
- smalltalk.send(self,"_assert_",[smalltalk.send(visited,"__eq",["world"])]);
1101
- smalltalk.send(d,"_at_ifPresent_ifAbsent_",["buy",(function(value){
1102
- visited=value;
1341
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
1342
+ _st(self)._assert_(_st(visited).__eq("world"));
1343
+ _st(d)._at_ifPresent_ifAbsent_("buy",(function(value){
1344
+ return smalltalk.withContext(function($ctx2) {
1103
1345
  return visited;
1104
- }),(function(){
1105
- visited=true;
1346
+ }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1)})}),(function(){
1347
+ return smalltalk.withContext(function($ctx2) {
1106
1348
  return visited;
1107
- })]);
1108
- smalltalk.send(self,"_assert_",[visited]);
1109
- return self},
1349
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
1350
+ _st(self)._assert_(visited);
1351
+ return self}, function($ctx1) {$ctx1.fill(self,"testIfPresentIfAbsent",{d:d,visited:visited}, smalltalk.DictionaryTest)})},
1110
1352
  args: [],
1111
1353
  source: "testIfPresentIfAbsent\x0a\x0a\x09| d visited |\x0a\x09visited := false.\x0a\x09d := Dictionary new.\x0a\x09d at: 'hello' put: 'world'.\x0a\x0a\x09d at: 'hello' ifPresent: [ :value | visited := value ] ifAbsent: [ visited := true ].\x0a\x09self assert: visited = 'world'.\x0a\x0a\x09d at: 'buy' ifPresent: [ :value | visited := value ] ifAbsent: [ visited := true ].\x0a\x09self assert: visited.",
1112
1354
  messageSends: ["new", "at:put:", "at:ifPresent:ifAbsent:", "assert:", "="],
@@ -1122,12 +1364,12 @@ category: 'tests',
1122
1364
  fn: function (){
1123
1365
  var self=this;
1124
1366
  var d;
1125
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1126
- smalltalk.send(d,"_at_put_",[(1),(2)]);
1127
- smalltalk.send(d,"_at_put_",[(2),(3)]);
1128
- smalltalk.send(d,"_at_put_",[(3),(4)]);
1129
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_keys",[]),"__eq",[[(1), (2), (3)]])]);
1130
- return self},
1367
+ return smalltalk.withContext(function($ctx1) {
1368
+ _st(d)._at_put_((1),(2));
1369
+ _st(d)._at_put_((2),(3));
1370
+ _st(d)._at_put_((3),(4));
1371
+ _st(self)._assert_(_st(_st(d)._keys()).__eq([(1), (2), (3)]));
1372
+ return self}, function($ctx1) {$ctx1.fill(self,"testKeys",{d:d}, smalltalk.DictionaryTest)})},
1131
1373
  args: [],
1132
1374
  source: "testKeys\x0a\x09| d |\x0a\x0a\x09d := Dictionary new.\x0a\x09d at: 1 put: 2.\x0a\x09d at: 2 put: 3.\x0a\x09d at: 3 put: 4.\x0a\x0a\x09self assert: d keys = #(1 2 3)",
1133
1375
  messageSends: ["new", "at:put:", "assert:", "=", "keys"],
@@ -1142,13 +1384,13 @@ selector: "testPrintString",
1142
1384
  category: 'tests',
1143
1385
  fn: function (){
1144
1386
  var self=this;
1145
- var $1,$2;
1146
- $1=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1147
- smalltalk.send($1,"_at_put_",["firstname","James"]);
1148
- smalltalk.send($1,"_at_put_",["lastname","Bond"]);
1149
- $2=smalltalk.send($1,"_printString",[]);
1150
- smalltalk.send(self,"_assert_equals_",["a Dictionary('firstname'->'James' , 'lastname'->'Bond')",$2]);
1151
- return self},
1387
+ return smalltalk.withContext(function($ctx1) {
1388
+ $1=_st((smalltalk.Dictionary || Dictionary))._new();
1389
+ _st($1)._at_put_("firstname","James");
1390
+ _st($1)._at_put_("lastname","Bond");
1391
+ $2=_st($1)._printString();
1392
+ _st(self)._assert_equals_("a Dictionary('firstname'->'James' , 'lastname'->'Bond')",$2);
1393
+ return self}, function($ctx1) {$ctx1.fill(self,"testPrintString",{}, smalltalk.DictionaryTest)})},
1152
1394
  args: [],
1153
1395
  source: "testPrintString\x0a\x09self\x0a\x09\x09assert: 'a Dictionary(''firstname''->''James'' , ''lastname''->''Bond'')' \x0a\x09\x09equals: (Dictionary new \x0a \x09at:'firstname' put: 'James';\x0a \x09at:'lastname' put: 'Bond';\x0a \x09printString)",
1154
1396
  messageSends: ["assert:equals:", "at:put:", "new", "printString"],
@@ -1163,19 +1405,18 @@ selector: "testRemoveKey",
1163
1405
  category: 'tests',
1164
1406
  fn: function (){
1165
1407
  var self=this;
1166
- var d;
1167
- var key;
1168
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1169
- smalltalk.send(d,"_at_put_",[(1),(2)]);
1170
- smalltalk.send(d,"_at_put_",[(2),(3)]);
1171
- smalltalk.send(d,"_at_put_",[(3),(4)]);
1408
+ var d,key;
1409
+ return smalltalk.withContext(function($ctx1) {
1410
+ _st(d)._at_put_((1),(2));
1411
+ _st(d)._at_put_((2),(3));
1412
+ _st(d)._at_put_((3),(4));
1172
1413
  key=(2);
1173
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_keys",[]),"__eq",[[(1), (2), (3)]])]);
1174
- smalltalk.send(d,"_removeKey_",[key]);
1175
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_keys",[]),"__eq",[[(1), (3)]])]);
1176
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_values",[]),"__eq",[[(2), (4)]])]);
1177
- smalltalk.send(self,"_deny_",[smalltalk.send(d,"_includesKey_",[(2)])]);
1178
- return self},
1414
+ _st(self)._assert_(_st(_st(d)._keys()).__eq([(1), (2), (3)]));
1415
+ _st(d)._removeKey_(key);
1416
+ _st(self)._assert_(_st(_st(d)._keys()).__eq([(1), (3)]));
1417
+ _st(self)._assert_(_st(_st(d)._values()).__eq([(2), (4)]));
1418
+ _st(self)._deny_(_st(d)._includesKey_((2)));
1419
+ return self}, function($ctx1) {$ctx1.fill(self,"testRemoveKey",{d:d,key:key}, smalltalk.DictionaryTest)})},
1179
1420
  args: [],
1180
1421
  source: "testRemoveKey\x0a | d key |\x0a\x0a d := Dictionary new.\x0a d at: 1 put: 2.\x0a d at: 2 put: 3.\x0a d at: 3 put: 4.\x0a\x0a key := 2.\x0a\x0a self assert: d keys = #(1 2 3).\x0a\x0a d removeKey: key.\x0a self assert: d keys = #(1 3).\x0a self assert: d values = #(2 4).\x0a self deny: (d includesKey: 2)",
1181
1422
  messageSends: ["new", "at:put:", "assert:", "=", "keys", "removeKey:", "values", "deny:", "includesKey:"],
@@ -1190,23 +1431,22 @@ selector: "testRemoveKeyIfAbsent",
1190
1431
  category: 'tests',
1191
1432
  fn: function (){
1192
1433
  var self=this;
1193
- var d;
1194
- var key;
1195
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1196
- smalltalk.send(d,"_at_put_",[(1),(2)]);
1197
- smalltalk.send(d,"_at_put_",[(2),(3)]);
1198
- smalltalk.send(d,"_at_put_",[(3),(4)]);
1434
+ var d,key;
1435
+ return smalltalk.withContext(function($ctx1) {
1436
+ _st(d)._at_put_((1),(2));
1437
+ _st(d)._at_put_((2),(3));
1438
+ _st(d)._at_put_((3),(4));
1199
1439
  key=(2);
1200
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_removeKey_",[key]),"__eq",[(3)])]);
1440
+ _st(self)._assert_(_st(_st(d)._removeKey_(key)).__eq((3)));
1201
1441
  key=(3);
1202
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_removeKey_ifAbsent_",[key,(function(){
1203
- return (42);
1204
- })]),"__eq",[(4)])]);
1442
+ _st(self)._assert_(_st(_st(d)._removeKey_ifAbsent_(key,(function(){
1443
+ return smalltalk.withContext(function($ctx2) {
1444
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq((4)));
1205
1445
  key="why";
1206
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_removeKey_ifAbsent_",[key,(function(){
1207
- return (42);
1208
- })]),"__eq",[(42)])]);
1209
- return self},
1446
+ _st(self)._assert_(_st(_st(d)._removeKey_ifAbsent_(key,(function(){
1447
+ return smalltalk.withContext(function($ctx2) {
1448
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq((42)));
1449
+ return self}, function($ctx1) {$ctx1.fill(self,"testRemoveKeyIfAbsent",{d:d,key:key}, smalltalk.DictionaryTest)})},
1210
1450
  args: [],
1211
1451
  source: "testRemoveKeyIfAbsent\x0a | d key |\x0a\x0a d := Dictionary new.\x0a d at: 1 put: 2.\x0a d at: 2 put: 3.\x0a d at: 3 put: 4.\x0a\x0a key := 2.\x0a self assert: (d removeKey: key) = 3.\x0a\x0a key := 3.\x0a self assert: (d removeKey: key ifAbsent: [42]) = 4.\x0a\x0a key := 'why'.\x0a self assert: (d removeKey: key ifAbsent: [42] ) = 42.",
1212
1452
  messageSends: ["new", "at:put:", "assert:", "=", "removeKey:", "removeKey:ifAbsent:"],
@@ -1222,13 +1462,13 @@ category: 'tests',
1222
1462
  fn: function (){
1223
1463
  var self=this;
1224
1464
  var d;
1225
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1226
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_size",[]),"__eq",[(0)])]);
1227
- smalltalk.send(d,"_at_put_",[(1),(2)]);
1228
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_size",[]),"__eq",[(1)])]);
1229
- smalltalk.send(d,"_at_put_",[(2),(3)]);
1230
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_size",[]),"__eq",[(2)])]);
1231
- return self},
1465
+ return smalltalk.withContext(function($ctx1) {
1466
+ _st(self)._assert_(_st(_st(d)._size()).__eq((0)));
1467
+ _st(d)._at_put_((1),(2));
1468
+ _st(self)._assert_(_st(_st(d)._size()).__eq((1)));
1469
+ _st(d)._at_put_((2),(3));
1470
+ _st(self)._assert_(_st(_st(d)._size()).__eq((2)));
1471
+ return self}, function($ctx1) {$ctx1.fill(self,"testSize",{d:d}, smalltalk.DictionaryTest)})},
1232
1472
  args: [],
1233
1473
  source: "testSize\x0a\x09| d |\x0a\x0a\x09d := Dictionary new.\x0a\x09self assert: d size = 0.\x0a\x0a\x09d at: 1 put: 2.\x0a\x09self assert: d size = 1.\x0a\x0a\x09d at: 2 put: 3.\x0a\x09self assert: d size = 2.",
1234
1474
  messageSends: ["new", "assert:", "=", "size", "at:put:"],
@@ -1244,12 +1484,12 @@ category: 'tests',
1244
1484
  fn: function (){
1245
1485
  var self=this;
1246
1486
  var d;
1247
- d=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
1248
- smalltalk.send(d,"_at_put_",[(1),(2)]);
1249
- smalltalk.send(d,"_at_put_",[(2),(3)]);
1250
- smalltalk.send(d,"_at_put_",[(3),(4)]);
1251
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(d,"_values",[]),"__eq",[[(2), (3), (4)]])]);
1252
- return self},
1487
+ return smalltalk.withContext(function($ctx1) {
1488
+ _st(d)._at_put_((1),(2));
1489
+ _st(d)._at_put_((2),(3));
1490
+ _st(d)._at_put_((3),(4));
1491
+ _st(self)._assert_(_st(_st(d)._values()).__eq([(2), (3), (4)]));
1492
+ return self}, function($ctx1) {$ctx1.fill(self,"testValues",{d:d}, smalltalk.DictionaryTest)})},
1253
1493
  args: [],
1254
1494
  source: "testValues\x0a\x09| d |\x0a\x0a\x09d := Dictionary new.\x0a\x09d at: 1 put: 2.\x0a\x09d at: 2 put: 3.\x0a\x09d at: 3 put: 4.\x0a\x0a\x09self assert: d values = #(2 3 4)",
1255
1495
  messageSends: ["new", "at:put:", "assert:", "=", "values"],
@@ -1265,8 +1505,10 @@ selector: "collectionClass",
1265
1505
  category: 'accessing',
1266
1506
  fn: function (){
1267
1507
  var self=this;
1268
- return (smalltalk.Dictionary || Dictionary);
1269
- },
1508
+ return smalltalk.withContext(function($ctx1) {
1509
+ $1=(smalltalk.Dictionary || Dictionary);
1510
+ return $1;
1511
+ }, function($ctx1) {$ctx1.fill(self,"collectionClass",{}, smalltalk.DictionaryTest.klass)})},
1270
1512
  args: [],
1271
1513
  source: "collectionClass\x0a\x09^ Dictionary",
1272
1514
  messageSends: [],
@@ -1283,11 +1525,11 @@ selector: "testAt",
1283
1525
  category: 'tests',
1284
1526
  fn: function (){
1285
1527
  var self=this;
1286
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_at_",[(4)]),"__eq",[(-4)])]);
1287
- smalltalk.send(self,"_should_raise_",[(function(){
1288
- return smalltalk.send(smalltalk.send(self,"_collection",[]),"_at_",[(5)]);
1289
- }),(smalltalk.Error || Error)]);
1290
- return self},
1528
+ return smalltalk.withContext(function($ctx1) {
1529
+ _st(self)._should_raise_((function(){
1530
+ return smalltalk.withContext(function($ctx2) {
1531
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
1532
+ return self}, function($ctx1) {$ctx1.fill(self,"testAt",{}, smalltalk.SequenceableCollectionTest)})},
1291
1533
  args: [],
1292
1534
  source: "testAt\x0a\x09self assert: (self collection at: 4) = -4.\x0a\x09self should: [ self collection at: 5 ] raise: Error",
1293
1535
  messageSends: ["assert:", "=", "at:", "collection", "should:raise:"],
@@ -1302,10 +1544,10 @@ selector: "testAtIfAbsent",
1302
1544
  category: 'tests',
1303
1545
  fn: function (){
1304
1546
  var self=this;
1305
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_at_ifAbsent_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_size",[]),"__plus",[(1)]),(function(){
1306
- return "none";
1307
- })]),"__eq",["none"])]);
1308
- return self},
1547
+ return smalltalk.withContext(function($ctx1) {
1548
+ return smalltalk.withContext(function($ctx2) {
1549
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq("none"));
1550
+ return self}, function($ctx1) {$ctx1.fill(self,"testAtIfAbsent",{}, smalltalk.SequenceableCollectionTest)})},
1309
1551
  args: [],
1310
1552
  source: "testAtIfAbsent\x0a\x09self assert: (self collection at: (self collection size + 1) ifAbsent: [ 'none' ]) = 'none'",
1311
1553
  messageSends: ["assert:", "=", "at:ifAbsent:", "+", "size", "collection"],
@@ -1324,22 +1566,22 @@ category: 'testing',
1324
1566
  fn: function (){
1325
1567
  var self=this;
1326
1568
  var array;
1327
- array=["hello", "world"];
1328
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(array,"_at_",[(1)]),"hello"]);
1329
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(array,"_at_",[(2)]),"world"]);
1330
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(array,"_at_ifAbsent_",[(2),(function(){
1331
- return "not found";
1332
- })]),"world"]);
1333
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(array,"_at_ifAbsent_",[(0),(function(){
1334
- return "not found";
1335
- })]),"not found"]);
1336
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(array,"_at_ifAbsent_",[(-10),(function(){
1337
- return "not found";
1338
- })]),"not found"]);
1339
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(array,"_at_ifAbsent_",[(3),(function(){
1340
- return "not found";
1341
- })]),"not found"]);
1342
- return self},
1569
+ return smalltalk.withContext(function($ctx1) {
1570
+ _st(self)._assert_equals_(_st(array)._at_((1)),"hello");
1571
+ _st(self)._assert_equals_(_st(array)._at_((2)),"world");
1572
+ _st(self)._assert_equals_(_st(array)._at_ifAbsent_((2),(function(){
1573
+ return smalltalk.withContext(function($ctx2) {
1574
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})),"world");
1575
+ _st(self)._assert_equals_(_st(array)._at_ifAbsent_((0),(function(){
1576
+ return smalltalk.withContext(function($ctx2) {
1577
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})),"not found");
1578
+ _st(self)._assert_equals_(_st(array)._at_ifAbsent_((-10),(function(){
1579
+ return smalltalk.withContext(function($ctx2) {
1580
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})),"not found");
1581
+ _st(self)._assert_equals_(_st(array)._at_ifAbsent_((3),(function(){
1582
+ return smalltalk.withContext(function($ctx2) {
1583
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})),"not found");
1584
+ return self}, function($ctx1) {$ctx1.fill(self,"testAtIfAbsent",{array:array}, smalltalk.ArrayTest)})},
1343
1585
  args: [],
1344
1586
  source: "testAtIfAbsent\x0a\x09| array |\x0a\x09array := #('hello' 'world').\x0a\x09self assert: (array at: 1) equals: 'hello'.\x0a\x09self assert: (array at: 2) equals: 'world'.\x0a\x09self assert: (array at: 2 ifAbsent: ['not found']) equals: 'world'.\x0a\x09self assert: (array at: 0 ifAbsent: ['not found']) equals: 'not found'.\x0a\x09self assert: (array at: -10 ifAbsent: ['not found']) equals: 'not found'.\x0a\x09self assert: (array at: 3 ifAbsent: ['not found']) equals: 'not found'.",
1345
1587
  messageSends: ["assert:equals:", "at:", "at:ifAbsent:"],
@@ -1354,8 +1596,8 @@ selector: "testFirstN",
1354
1596
  category: 'testing',
1355
1597
  fn: function (){
1356
1598
  var self=this;
1357
- smalltalk.send(self,"_assert_equals_",[[(1),(2),(3)],smalltalk.send([(1),(2),(3),(4),(5)],"_first_",[(3)])]);
1358
- return self},
1599
+ return smalltalk.withContext(function($ctx1) {
1600
+ return self}, function($ctx1) {$ctx1.fill(self,"testFirstN",{}, smalltalk.ArrayTest)})},
1359
1601
  args: [],
1360
1602
  source: "testFirstN\x0a\x09self assert: {1. 2. 3} equals: ({1. 2. 3. 4. 5} first: 3).",
1361
1603
  messageSends: ["assert:equals:", "first:"],
@@ -1370,10 +1612,10 @@ selector: "testIfEmpty",
1370
1612
  category: 'testing',
1371
1613
  fn: function (){
1372
1614
  var self=this;
1373
- smalltalk.send(self,"_assert_equals_",["zork",smalltalk.send("","_ifEmpty_",[(function(){
1374
- return "zork";
1375
- })])]);
1376
- return self},
1615
+ return smalltalk.withContext(function($ctx1) {
1616
+ return smalltalk.withContext(function($ctx2) {
1617
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})));
1618
+ return self}, function($ctx1) {$ctx1.fill(self,"testIfEmpty",{}, smalltalk.ArrayTest)})},
1377
1619
  args: [],
1378
1620
  source: "testIfEmpty\x0a\x09self assert: 'zork' equals: ( '' ifEmpty: ['zork'] )",
1379
1621
  messageSends: ["assert:equals:", "ifEmpty:"],
@@ -1388,23 +1630,25 @@ selector: "testPrintString",
1388
1630
  category: 'testing',
1389
1631
  fn: function (){
1390
1632
  var self=this;
1391
- var $1,$2;
1392
1633
  var array;
1393
- array=smalltalk.send((smalltalk.Array || Array),"_new",[]);
1394
- smalltalk.send(self,"_assert_equals_",["a Array ()",smalltalk.send(array,"_printString",[])]);
1395
- smalltalk.send(array,"_add_",[(1)]);
1396
- $1=smalltalk.send(array,"_add_",[(3)]);
1397
- smalltalk.send(self,"_assert_equals_",["a Array (1 3)",smalltalk.send(array,"_printString",[])]);
1398
- smalltalk.send(array,"_add_",["foo"]);
1399
- smalltalk.send(self,"_assert_equals_",["a Array (1 3 'foo')",smalltalk.send(array,"_printString",[])]);
1400
- smalltalk.send(array,"_remove_",[(1)]);
1401
- $2=smalltalk.send(array,"_remove_",[(3)]);
1402
- smalltalk.send(self,"_assert_equals_",["a Array ('foo')",smalltalk.send(array,"_printString",[])]);
1403
- smalltalk.send(array,"_addLast_",[(3)]);
1404
- smalltalk.send(self,"_assert_equals_",["a Array ('foo' 3)",smalltalk.send(array,"_printString",[])]);
1405
- smalltalk.send(array,"_addLast_",[(3)]);
1406
- smalltalk.send(self,"_assert_equals_",["a Array ('foo' 3 3)",smalltalk.send(array,"_printString",[])]);
1407
- return self},
1634
+ return smalltalk.withContext(function($ctx1) {
1635
+ array=_st((smalltalk.Array || Array))._new();
1636
+ _st(self)._assert_equals_("a Array ()",_st(array)._printString());
1637
+ $1=array;
1638
+ _st($1)._add_((1));
1639
+ $2=_st($1)._add_((3));
1640
+ _st(self)._assert_equals_("a Array (1 3)",_st(array)._printString());
1641
+ _st(array)._add_("foo");
1642
+ _st(self)._assert_equals_("a Array (1 3 'foo')",_st(array)._printString());
1643
+ $3=array;
1644
+ _st($3)._remove_((1));
1645
+ $4=_st($3)._remove_((3));
1646
+ _st(self)._assert_equals_("a Array ('foo')",_st(array)._printString());
1647
+ _st(array)._addLast_((3));
1648
+ _st(self)._assert_equals_("a Array ('foo' 3)",_st(array)._printString());
1649
+ _st(array)._addLast_((3));
1650
+ _st(self)._assert_equals_("a Array ('foo' 3 3)",_st(array)._printString());
1651
+ return self}, function($ctx1) {$ctx1.fill(self,"testPrintString",{array:array}, smalltalk.ArrayTest)})},
1408
1652
  args: [],
1409
1653
  source: "testPrintString\x0a\x09| array |\x0a\x09array := Array new.\x0a\x09self assert: 'a Array ()' equals: ( array printString ).\x0a\x09array add: 1; add: 3.\x0a\x09self assert: 'a Array (1 3)' equals: ( array printString ).\x0a\x09array add: 'foo'.\x0a\x09self assert: 'a Array (1 3 ''foo'')' equals: ( array printString ).\x0a\x09array remove: 1; remove: 3.\x0a\x09self assert: 'a Array (''foo'')' equals: ( array printString ).\x0a\x09array addLast: 3.\x0a\x09self assert: 'a Array (''foo'' 3)' equals: ( array printString ).\x0a\x09array addLast: 3.\x0a\x09self assert: 'a Array (''foo'' 3 3)' equals: ( array printString ).",
1410
1654
  messageSends: ["new", "assert:equals:", "printString", "add:", "remove:", "addLast:"],
@@ -1420,8 +1664,10 @@ selector: "collectionClass",
1420
1664
  category: 'accessing',
1421
1665
  fn: function (){
1422
1666
  var self=this;
1423
- return (smalltalk.Array || Array);
1424
- },
1667
+ return smalltalk.withContext(function($ctx1) {
1668
+ $1=(smalltalk.Array || Array);
1669
+ return $1;
1670
+ }, function($ctx1) {$ctx1.fill(self,"collectionClass",{}, smalltalk.ArrayTest.klass)})},
1425
1671
  args: [],
1426
1672
  source: "collectionClass\x0a\x09^ Array",
1427
1673
  messageSends: [],
@@ -1438,8 +1684,8 @@ selector: "collection",
1438
1684
  category: 'accessing',
1439
1685
  fn: function (){
1440
1686
  var self=this;
1441
- return "hello";
1442
- },
1687
+ return smalltalk.withContext(function($ctx1) {
1688
+ }, function($ctx1) {$ctx1.fill(self,"collection",{}, smalltalk.StringTest)})},
1443
1689
  args: [],
1444
1690
  source: "collection\x0a\x09^'hello'",
1445
1691
  messageSends: [],
@@ -1454,8 +1700,8 @@ selector: "collectionWithDuplicates",
1454
1700
  category: 'accessing',
1455
1701
  fn: function (){
1456
1702
  var self=this;
1457
- return "abbaerte";
1458
- },
1703
+ return smalltalk.withContext(function($ctx1) {
1704
+ }, function($ctx1) {$ctx1.fill(self,"collectionWithDuplicates",{}, smalltalk.StringTest)})},
1459
1705
  args: [],
1460
1706
  source: "collectionWithDuplicates\x0a\x09^ 'abbaerte'",
1461
1707
  messageSends: [],
@@ -1470,13 +1716,13 @@ selector: "testAddRemove",
1470
1716
  category: 'tests',
1471
1717
  fn: function (){
1472
1718
  var self=this;
1473
- smalltalk.send(self,"_should_raise_",[(function(){
1474
- return smalltalk.send("hello","_add_",["a"]);
1475
- }),(smalltalk.Error || Error)]);
1476
- smalltalk.send(self,"_should_raise_",[(function(){
1477
- return smalltalk.send("hello","_remove_",["h"]);
1478
- }),(smalltalk.Error || Error)]);
1479
- return self},
1719
+ return smalltalk.withContext(function($ctx1) {
1720
+ return smalltalk.withContext(function($ctx2) {
1721
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
1722
+ _st(self)._should_raise_((function(){
1723
+ return smalltalk.withContext(function($ctx2) {
1724
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
1725
+ return self}, function($ctx1) {$ctx1.fill(self,"testAddRemove",{}, smalltalk.StringTest)})},
1480
1726
  args: [],
1481
1727
  source: "testAddRemove\x0a\x09self should: ['hello' add: 'a'] raise: Error.\x0a\x09self should: ['hello' remove: 'h'] raise: Error",
1482
1728
  messageSends: ["should:raise:", "add:", "remove:"],
@@ -1491,8 +1737,8 @@ selector: "testAsArray",
1491
1737
  category: 'tests',
1492
1738
  fn: function (){
1493
1739
  var self=this;
1494
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send("hello","_asArray",[]),"__eq",[["h", "e", "l", "l", "o"]])]);
1495
- return self},
1740
+ return smalltalk.withContext(function($ctx1) {
1741
+ return self}, function($ctx1) {$ctx1.fill(self,"testAsArray",{}, smalltalk.StringTest)})},
1496
1742
  args: [],
1497
1743
  source: "testAsArray\x0a\x09self assert: 'hello' asArray = #('h' 'e' 'l' 'l' 'o').",
1498
1744
  messageSends: ["assert:", "=", "asArray"],
@@ -1507,12 +1753,12 @@ selector: "testAt",
1507
1753
  category: 'tests',
1508
1754
  fn: function (){
1509
1755
  var self=this;
1510
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send("hello","_at_",[(1)]),"__eq",["h"])]);
1511
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send("hello","_at_",[(5)]),"__eq",["o"])]);
1512
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send("hello","_at_ifAbsent_",[(6),(function(){
1513
- return nil;
1514
- })]),"__eq",[nil])]);
1515
- return self},
1756
+ return smalltalk.withContext(function($ctx1) {
1757
+ _st(self)._assert_(_st(_st("hello")._at_((5))).__eq("o"));
1758
+ _st(self)._assert_(_st(_st("hello")._at_ifAbsent_((6),(function(){
1759
+ return smalltalk.withContext(function($ctx2) {
1760
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq(nil));
1761
+ return self}, function($ctx1) {$ctx1.fill(self,"testAt",{}, smalltalk.StringTest)})},
1516
1762
  args: [],
1517
1763
  source: "testAt\x0a\x09self assert: ('hello' at: 1) = 'h'.\x0a\x09self assert: ('hello' at: 5) = 'o'.\x0a\x09self assert: ('hello' at: 6 ifAbsent: [nil]) = nil",
1518
1764
  messageSends: ["assert:", "=", "at:", "at:ifAbsent:"],
@@ -1527,10 +1773,10 @@ selector: "testAtPut",
1527
1773
  category: 'tests',
1528
1774
  fn: function (){
1529
1775
  var self=this;
1530
- smalltalk.send(self,"_should_raise_",[(function(){
1531
- return smalltalk.send("hello","_at_put_",[(1),"a"]);
1532
- }),(smalltalk.Error || Error)]);
1533
- return self},
1776
+ return smalltalk.withContext(function($ctx1) {
1777
+ return smalltalk.withContext(function($ctx2) {
1778
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
1779
+ return self}, function($ctx1) {$ctx1.fill(self,"testAtPut",{}, smalltalk.StringTest)})},
1534
1780
  args: [],
1535
1781
  source: "testAtPut\x0a\x09\x22String instances are read-only\x22\x0a\x09self should: ['hello' at: 1 put: 'a'] raise: Error",
1536
1782
  messageSends: ["should:raise:", "at:put:"],
@@ -1546,11 +1792,11 @@ category: 'tests',
1546
1792
  fn: function (){
1547
1793
  var self=this;
1548
1794
  var newCollection;
1549
- newCollection="hheelllloo";
1550
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_collect_",[(function(each){
1551
- return smalltalk.send(each,"__comma",[each]);
1552
- })]),newCollection]);
1553
- return self},
1795
+ return smalltalk.withContext(function($ctx1) {
1796
+ _st(self)._assertSameContents_as_(_st(_st(self)._collection())._collect_((function(each){
1797
+ return smalltalk.withContext(function($ctx2) {
1798
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})),newCollection);
1799
+ return self}, function($ctx1) {$ctx1.fill(self,"testCollect",{newCollection:newCollection}, smalltalk.StringTest)})},
1554
1800
  args: [],
1555
1801
  source: "testCollect\x0a\x09| newCollection |\x0a\x09newCollection := 'hheelllloo'.\x0a\x09self \x0a\x09\x09assertSameContents: (self collection collect: [ :each |\x0a\x09\x09\x09each, each ])\x0a\x09\x09as: newCollection",
1556
1802
  messageSends: ["assertSameContents:as:", "collect:", ",", "collection"],
@@ -1565,8 +1811,8 @@ selector: "testCopyWithoutAll",
1565
1811
  category: 'tests',
1566
1812
  fn: function (){
1567
1813
  var self=this;
1568
- smalltalk.send(self,"_assert_equals_",["hello world",smalltalk.send("*hello* *world*","_copyWithoutAll_",["*"])]);
1569
- return self},
1814
+ return smalltalk.withContext(function($ctx1) {
1815
+ return self}, function($ctx1) {$ctx1.fill(self,"testCopyWithoutAll",{}, smalltalk.StringTest)})},
1570
1816
  args: [],
1571
1817
  source: "testCopyWithoutAll\x0a\x09self \x0a\x09\x09assert: 'hello world' \x0a\x09\x09equals: ('*hello* *world*' copyWithoutAll: '*')",
1572
1818
  messageSends: ["assert:equals:", "copyWithoutAll:"],
@@ -1581,15 +1827,15 @@ selector: "testDetect",
1581
1827
  category: 'tests',
1582
1828
  fn: function (){
1583
1829
  var self=this;
1584
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_detect_",[(function(each){
1585
- return smalltalk.send(each,"__eq",["h"]);
1586
- })]),"__eq",["h"])]);
1587
- smalltalk.send(self,"_should_raise_",[(function(){
1588
- return smalltalk.send(smalltalk.send(self,"_collection",[]),"_detect_",[(function(each){
1589
- return smalltalk.send(each,"__eq",[(6)]);
1590
- })]);
1591
- }),(smalltalk.Error || Error)]);
1592
- return self},
1830
+ return smalltalk.withContext(function($ctx1) {
1831
+ return smalltalk.withContext(function($ctx2) {
1832
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}))).__eq("h"));
1833
+ _st(self)._should_raise_((function(){
1834
+ return smalltalk.withContext(function($ctx2) {
1835
+ return smalltalk.withContext(function($ctx3) {
1836
+ }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
1837
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
1838
+ return self}, function($ctx1) {$ctx1.fill(self,"testDetect",{}, smalltalk.StringTest)})},
1593
1839
  args: [],
1594
1840
  source: "testDetect\x0a\x09self assert: (self collection detect: [ :each | each = 'h' ]) = 'h'.\x0a\x09self \x0a\x09\x09should: [ self collection detect: [ :each | each = 6 ] ]\x0a\x09\x09raise: Error",
1595
1841
  messageSends: ["assert:", "=", "detect:", "collection", "should:raise:"],
@@ -1604,12 +1850,12 @@ selector: "testEquality",
1604
1850
  category: 'tests',
1605
1851
  fn: function (){
1606
1852
  var self=this;
1607
- smalltalk.send(self,"_assert_",[smalltalk.send("hello","__eq",["hello"])]);
1608
- smalltalk.send(self,"_deny_",[smalltalk.send("hello","__eq",["world"])]);
1609
- smalltalk.send(self,"_assert_",[smalltalk.send("hello","__eq",[smalltalk.send("hello","_yourself",[])])]);
1610
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send("hello","_yourself",[]),"__eq",["hello"])]);
1611
- smalltalk.send(self,"_deny_",[smalltalk.send("","__eq",[(0)])]);
1612
- return self},
1853
+ return smalltalk.withContext(function($ctx1) {
1854
+ _st(self)._deny_(_st("hello").__eq("world"));
1855
+ _st(self)._assert_(_st("hello").__eq(_st("hello")._yourself()));
1856
+ _st(self)._assert_(_st(_st("hello")._yourself()).__eq("hello"));
1857
+ _st(self)._deny_(_st("").__eq((0)));
1858
+ return self}, function($ctx1) {$ctx1.fill(self,"testEquality",{}, smalltalk.StringTest)})},
1613
1859
  args: [],
1614
1860
  source: "testEquality\x0a\x09self assert: 'hello' = 'hello'.\x0a\x09self deny: 'hello' = 'world'.\x0a\x0a\x09self assert: 'hello' = 'hello' yourself.\x0a\x09self assert: 'hello' yourself = 'hello'.\x0a\x0a\x09\x22test JS falsy value\x22\x0a\x09self deny: '' = 0",
1615
1861
  messageSends: ["assert:", "=", "deny:", "yourself"],
@@ -1624,12 +1870,12 @@ selector: "testIdentity",
1624
1870
  category: 'tests',
1625
1871
  fn: function (){
1626
1872
  var self=this;
1627
- smalltalk.send(self,"_assert_",[smalltalk.send("hello","__eq_eq",["hello"])]);
1628
- smalltalk.send(self,"_deny_",[smalltalk.send("hello","__eq_eq",["world"])]);
1629
- smalltalk.send(self,"_assert_",[smalltalk.send("hello","__eq_eq",[smalltalk.send("hello","_yourself",[])])]);
1630
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send("hello","_yourself",[]),"__eq_eq",["hello"])]);
1631
- smalltalk.send(self,"_deny_",[smalltalk.send("","__eq_eq",[(0)])]);
1632
- return self},
1873
+ return smalltalk.withContext(function($ctx1) {
1874
+ _st(self)._deny_(_st("hello").__eq_eq("world"));
1875
+ _st(self)._assert_(_st("hello").__eq_eq(_st("hello")._yourself()));
1876
+ _st(self)._assert_(_st(_st("hello")._yourself()).__eq_eq("hello"));
1877
+ _st(self)._deny_(_st("").__eq_eq((0)));
1878
+ return self}, function($ctx1) {$ctx1.fill(self,"testIdentity",{}, smalltalk.StringTest)})},
1633
1879
  args: [],
1634
1880
  source: "testIdentity\x0a\x09self assert: 'hello' == 'hello'.\x0a\x09self deny: 'hello' == 'world'.\x0a\x0a\x09self assert: 'hello' == 'hello' yourself.\x0a\x09self assert: 'hello' yourself == 'hello'.\x0a\x0a\x09\x22test JS falsy value\x22\x0a\x09self deny: '' == 0",
1635
1881
  messageSends: ["assert:", "==", "deny:", "yourself"],
@@ -1644,9 +1890,9 @@ selector: "testIncludesSubString",
1644
1890
  category: 'tests',
1645
1891
  fn: function (){
1646
1892
  var self=this;
1647
- smalltalk.send(self,"_assert_",[smalltalk.send("amber","_includesSubString_",["ber"])]);
1648
- smalltalk.send(self,"_deny_",[smalltalk.send("amber","_includesSubString_",["zork"])]);
1649
- return self},
1893
+ return smalltalk.withContext(function($ctx1) {
1894
+ _st(self)._deny_(_st("amber")._includesSubString_("zork"));
1895
+ return self}, function($ctx1) {$ctx1.fill(self,"testIncludesSubString",{}, smalltalk.StringTest)})},
1650
1896
  args: [],
1651
1897
  source: "testIncludesSubString\x0a\x09self assert: ('amber' includesSubString: 'ber').\x0a\x09self deny: ('amber' includesSubString: 'zork').",
1652
1898
  messageSends: ["assert:", "includesSubString:", "deny:"],
@@ -1661,8 +1907,8 @@ selector: "testJoin",
1661
1907
  category: 'tests',
1662
1908
  fn: function (){
1663
1909
  var self=this;
1664
- smalltalk.send(self,"_assert_equals_",["hello,world",smalltalk.send(",","_join_",[["hello", "world"]])]);
1665
- return self},
1910
+ return smalltalk.withContext(function($ctx1) {
1911
+ return self}, function($ctx1) {$ctx1.fill(self,"testJoin",{}, smalltalk.StringTest)})},
1666
1912
  args: [],
1667
1913
  source: "testJoin\x0a\x09self assert: 'hello,world' equals: (',' join: #('hello' 'world'))",
1668
1914
  messageSends: ["assert:equals:", "join:"],
@@ -1678,11 +1924,11 @@ category: 'tests',
1678
1924
  fn: function (){
1679
1925
  var self=this;
1680
1926
  var newCollection;
1681
- newCollection="o";
1682
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_select_",[(function(each){
1683
- return smalltalk.send(each,"__eq",["o"]);
1684
- })]),newCollection]);
1685
- return self},
1927
+ return smalltalk.withContext(function($ctx1) {
1928
+ _st(self)._assertSameContents_as_(_st(_st(self)._collection())._select_((function(each){
1929
+ return smalltalk.withContext(function($ctx2) {
1930
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})),newCollection);
1931
+ return self}, function($ctx1) {$ctx1.fill(self,"testSelect",{newCollection:newCollection}, smalltalk.StringTest)})},
1686
1932
  args: [],
1687
1933
  source: "testSelect\x0a\x09| newCollection |\x0a\x09newCollection := 'o'.\x0a\x09self \x0a\x09\x09assertSameContents: (self collection select: [ :each |\x0a\x09\x09\x09each = 'o' ])\x0a\x09\x09as: newCollection",
1688
1934
  messageSends: ["assertSameContents:as:", "select:", "=", "collection"],
@@ -1697,9 +1943,9 @@ selector: "testSize",
1697
1943
  category: 'tests',
1698
1944
  fn: function (){
1699
1945
  var self=this;
1700
- smalltalk.send(self,"_assert_equals_",[smalltalk.send("smalltalk","_size",[]),(9)]);
1701
- smalltalk.send(self,"_assert_equals_",[smalltalk.send("","_size",[]),(0)]);
1702
- return self},
1946
+ return smalltalk.withContext(function($ctx1) {
1947
+ _st(self)._assert_equals_(_st("")._size(),(0));
1948
+ return self}, function($ctx1) {$ctx1.fill(self,"testSize",{}, smalltalk.StringTest)})},
1703
1949
  args: [],
1704
1950
  source: "testSize\x0a\x09self assert: 'smalltalk' size equals: 9.\x0a\x09self assert: '' size equals: 0",
1705
1951
  messageSends: ["assert:equals:", "size"],
@@ -1714,14 +1960,15 @@ selector: "testStreamContents",
1714
1960
  category: 'tests',
1715
1961
  fn: function (){
1716
1962
  var self=this;
1717
- var $1;
1718
- smalltalk.send(self,"_assert_equals_",["hello world",smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(aStream){
1719
- smalltalk.send(aStream,"_nextPutAll_",["hello"]);
1720
- smalltalk.send(aStream,"_space",[]);
1721
- $1=smalltalk.send(aStream,"_nextPutAll_",["world"]);
1722
- return $1;
1723
- })])]);
1724
- return self},
1963
+ return smalltalk.withContext(function($ctx1) {
1964
+ _st(self)._assert_equals_("hello world",_st((smalltalk.String || String))._streamContents_((function(aStream){
1965
+ return smalltalk.withContext(function($ctx2) {
1966
+ _st($1)._nextPutAll_("hello");
1967
+ _st($1)._space();
1968
+ $2=_st($1)._nextPutAll_("world");
1969
+ return $2;
1970
+ }, function($ctx2) {$ctx2.fillBlock({aStream:aStream},$ctx1)})})));
1971
+ return self}, function($ctx1) {$ctx1.fill(self,"testStreamContents",{}, smalltalk.StringTest)})},
1725
1972
  args: [],
1726
1973
  source: "testStreamContents\x0a\x09self \x0a\x09\x09assert: 'hello world' \x0a\x09\x09equals: (String streamContents: [ :aStream | \x0a\x09\x09\x09aStream \x0a\x09\x09\x09\x09nextPutAll: 'hello'; space; \x0a\x09\x09\x09\x09nextPutAll: 'world' ])",
1727
1974
  messageSends: ["assert:equals:", "streamContents:", "nextPutAll:", "space"],
@@ -1737,8 +1984,10 @@ selector: "collectionClass",
1737
1984
  category: 'accessing',
1738
1985
  fn: function (){
1739
1986
  var self=this;
1740
- return (smalltalk.String || String);
1741
- },
1987
+ return smalltalk.withContext(function($ctx1) {
1988
+ $1=(smalltalk.String || String);
1989
+ return $1;
1990
+ }, function($ctx1) {$ctx1.fill(self,"collectionClass",{}, smalltalk.StringTest.klass)})},
1742
1991
  args: [],
1743
1992
  source: "collectionClass\x0a\x09^ String",
1744
1993
  messageSends: [],
@@ -1755,8 +2004,8 @@ selector: "collection",
1755
2004
  category: 'accessing',
1756
2005
  fn: function (){
1757
2006
  var self=this;
1758
- return smalltalk.symbolFor("hello");
1759
- },
2007
+ return smalltalk.withContext(function($ctx1) {
2008
+ }, function($ctx1) {$ctx1.fill(self,"collection",{}, smalltalk.SymbolTest)})},
1760
2009
  args: [],
1761
2010
  source: "collection\x0a\x09^ #hello",
1762
2011
  messageSends: [],
@@ -1771,8 +2020,8 @@ selector: "collectionWithDuplicates",
1771
2020
  category: 'accessing',
1772
2021
  fn: function (){
1773
2022
  var self=this;
1774
- return smalltalk.symbolFor("phhaaarorra");
1775
- },
2023
+ return smalltalk.withContext(function($ctx1) {
2024
+ }, function($ctx1) {$ctx1.fill(self,"collectionWithDuplicates",{}, smalltalk.SymbolTest)})},
1776
2025
  args: [],
1777
2026
  source: "collectionWithDuplicates\x0a\x09^ #phhaaarorra",
1778
2027
  messageSends: [],
@@ -1787,8 +2036,8 @@ selector: "testAsString",
1787
2036
  category: 'tests',
1788
2037
  fn: function (){
1789
2038
  var self=this;
1790
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.symbolFor("hello"),"_asString",[]),"hello"]);
1791
- return self},
2039
+ return smalltalk.withContext(function($ctx1) {
2040
+ return self}, function($ctx1) {$ctx1.fill(self,"testAsString",{}, smalltalk.SymbolTest)})},
1792
2041
  args: [],
1793
2042
  source: "testAsString\x0a\x09self assert: #hello asString equals: 'hello'",
1794
2043
  messageSends: ["assert:equals:", "asString"],
@@ -1803,8 +2052,8 @@ selector: "testAsSymbol",
1803
2052
  category: 'tests',
1804
2053
  fn: function (){
1805
2054
  var self=this;
1806
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("hello"),"__eq_eq",[smalltalk.send(smalltalk.symbolFor("hello"),"_asSymbol",[])])]);
1807
- return self},
2055
+ return smalltalk.withContext(function($ctx1) {
2056
+ return self}, function($ctx1) {$ctx1.fill(self,"testAsSymbol",{}, smalltalk.SymbolTest)})},
1808
2057
  args: [],
1809
2058
  source: "testAsSymbol\x0a\x09self assert: #hello == #hello asSymbol",
1810
2059
  messageSends: ["assert:", "==", "asSymbol"],
@@ -1819,12 +2068,12 @@ selector: "testAt",
1819
2068
  category: 'tests',
1820
2069
  fn: function (){
1821
2070
  var self=this;
1822
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"),"_at_",[(1)]),"__eq",["h"])]);
1823
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"),"_at_",[(5)]),"__eq",["o"])]);
1824
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"),"_at_ifAbsent_",[(6),(function(){
1825
- return nil;
1826
- })]),"__eq",[nil])]);
1827
- return self},
2071
+ return smalltalk.withContext(function($ctx1) {
2072
+ _st(self)._assert_(_st(_st(smalltalk.symbolFor("hello"))._at_((5))).__eq("o"));
2073
+ _st(self)._assert_(_st(_st(smalltalk.symbolFor("hello"))._at_ifAbsent_((6),(function(){
2074
+ return smalltalk.withContext(function($ctx2) {
2075
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq(nil));
2076
+ return self}, function($ctx1) {$ctx1.fill(self,"testAt",{}, smalltalk.SymbolTest)})},
1828
2077
  args: [],
1829
2078
  source: "testAt\x0a\x09self assert: (#hello at: 1) = 'h'.\x0a\x09self assert: (#hello at: 5) = 'o'.\x0a\x09self assert: (#hello at: 6 ifAbsent: [nil]) = nil",
1830
2079
  messageSends: ["assert:", "=", "at:", "at:ifAbsent:"],
@@ -1839,10 +2088,10 @@ selector: "testAtPut",
1839
2088
  category: 'tests',
1840
2089
  fn: function (){
1841
2090
  var self=this;
1842
- smalltalk.send(self,"_should_raise_",[(function(){
1843
- return smalltalk.send("hello","_at_put_",[(1),"a"]);
1844
- }),(smalltalk.Error || Error)]);
1845
- return self},
2091
+ return smalltalk.withContext(function($ctx1) {
2092
+ return smalltalk.withContext(function($ctx2) {
2093
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
2094
+ return self}, function($ctx1) {$ctx1.fill(self,"testAtPut",{}, smalltalk.SymbolTest)})},
1846
2095
  args: [],
1847
2096
  source: "testAtPut\x0a\x09\x22Symbol instances are read-only\x22\x0a\x09self should: ['hello' at: 1 put: 'a'] raise: Error",
1848
2097
  messageSends: ["should:raise:", "at:put:"],
@@ -1858,11 +2107,11 @@ category: 'tests',
1858
2107
  fn: function (){
1859
2108
  var self=this;
1860
2109
  var newCollection;
1861
- newCollection=smalltalk.symbolFor("hheelllloo");
1862
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_collect_",[(function(each){
1863
- return smalltalk.send(each,"__comma",[each]);
1864
- })]),newCollection]);
1865
- return self},
2110
+ return smalltalk.withContext(function($ctx1) {
2111
+ _st(self)._assertSameContents_as_(_st(_st(self)._collection())._collect_((function(each){
2112
+ return smalltalk.withContext(function($ctx2) {
2113
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})),newCollection);
2114
+ return self}, function($ctx1) {$ctx1.fill(self,"testCollect",{newCollection:newCollection}, smalltalk.SymbolTest)})},
1866
2115
  args: [],
1867
2116
  source: "testCollect\x0a\x09| newCollection |\x0a\x09newCollection := #hheelllloo.\x0a\x09self \x0a\x09\x09assertSameContents: (self collection collect: [ :each |\x0a\x09\x09\x09each, each ])\x0a\x09\x09as: newCollection",
1868
2117
  messageSends: ["assertSameContents:as:", "collect:", ",", "collection"],
@@ -1877,15 +2126,15 @@ selector: "testComparing",
1877
2126
  category: 'tests',
1878
2127
  fn: function (){
1879
2128
  var self=this;
1880
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("ab"),"__gt",[smalltalk.symbolFor("aa")])]);
1881
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.symbolFor("ab"),"__gt",[smalltalk.symbolFor("ba")])]);
1882
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("ab"),"__lt",[smalltalk.symbolFor("ba")])]);
1883
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.symbolFor("bb"),"__lt",[smalltalk.symbolFor("ba")])]);
1884
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("ab"),"__gt_eq",[smalltalk.symbolFor("aa")])]);
1885
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.symbolFor("ab"),"__gt_eq",[smalltalk.symbolFor("ba")])]);
1886
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("ab"),"__lt_eq",[smalltalk.symbolFor("ba")])]);
1887
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.symbolFor("bb"),"__lt_eq",[smalltalk.symbolFor("ba")])]);
1888
- return self},
2129
+ return smalltalk.withContext(function($ctx1) {
2130
+ _st(self)._deny_(_st(smalltalk.symbolFor("ab")).__gt(smalltalk.symbolFor("ba")));
2131
+ _st(self)._assert_(_st(smalltalk.symbolFor("ab")).__lt(smalltalk.symbolFor("ba")));
2132
+ _st(self)._deny_(_st(smalltalk.symbolFor("bb")).__lt(smalltalk.symbolFor("ba")));
2133
+ _st(self)._assert_(_st(smalltalk.symbolFor("ab")).__gt_eq(smalltalk.symbolFor("aa")));
2134
+ _st(self)._deny_(_st(smalltalk.symbolFor("ab")).__gt_eq(smalltalk.symbolFor("ba")));
2135
+ _st(self)._assert_(_st(smalltalk.symbolFor("ab")).__lt_eq(smalltalk.symbolFor("ba")));
2136
+ _st(self)._deny_(_st(smalltalk.symbolFor("bb")).__lt_eq(smalltalk.symbolFor("ba")));
2137
+ return self}, function($ctx1) {$ctx1.fill(self,"testComparing",{}, smalltalk.SymbolTest)})},
1889
2138
  args: [],
1890
2139
  source: "testComparing\x0a\x09self assert: #ab > #aa.\x0a\x09self deny: #ab > #ba.\x0a\x0a\x09self assert: #ab < #ba.\x0a\x09self deny: #bb < #ba.\x0a\x0a\x09self assert: #ab >= #aa.\x0a\x09self deny: #ab >= #ba.\x0a\x0a\x09self assert: #ab <= #ba.\x0a\x09self deny: #bb <= #ba",
1891
2140
  messageSends: ["assert:", ">", "deny:", "<", ">=", "<="],
@@ -1900,9 +2149,9 @@ selector: "testCopying",
1900
2149
  category: 'tests',
1901
2150
  fn: function (){
1902
2151
  var self=this;
1903
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"),"_copy",[]),"__eq_eq",[smalltalk.symbolFor("hello")])]);
1904
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"),"_deepCopy",[]),"__eq_eq",[smalltalk.symbolFor("hello")])]);
1905
- return self},
2152
+ return smalltalk.withContext(function($ctx1) {
2153
+ _st(self)._assert_(_st(_st(smalltalk.symbolFor("hello"))._deepCopy()).__eq_eq(smalltalk.symbolFor("hello")));
2154
+ return self}, function($ctx1) {$ctx1.fill(self,"testCopying",{}, smalltalk.SymbolTest)})},
1906
2155
  args: [],
1907
2156
  source: "testCopying\x0a\x09self assert: #hello copy == #hello.\x0a\x09self assert: #hello deepCopy == #hello",
1908
2157
  messageSends: ["assert:", "==", "copy", "deepCopy"],
@@ -1917,15 +2166,15 @@ selector: "testDetect",
1917
2166
  category: 'tests',
1918
2167
  fn: function (){
1919
2168
  var self=this;
1920
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_collection",[]),"_detect_",[(function(each){
1921
- return smalltalk.send(each,"__eq",["h"]);
1922
- })]),"__eq",["h"])]);
1923
- smalltalk.send(self,"_should_raise_",[(function(){
1924
- return smalltalk.send(smalltalk.send(self,"_collection",[]),"_detect_",[(function(each){
1925
- return smalltalk.send(each,"__eq",["z"]);
1926
- })]);
1927
- }),(smalltalk.Error || Error)]);
1928
- return self},
2169
+ return smalltalk.withContext(function($ctx1) {
2170
+ return smalltalk.withContext(function($ctx2) {
2171
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}))).__eq("h"));
2172
+ _st(self)._should_raise_((function(){
2173
+ return smalltalk.withContext(function($ctx2) {
2174
+ return smalltalk.withContext(function($ctx3) {
2175
+ }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
2176
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
2177
+ return self}, function($ctx1) {$ctx1.fill(self,"testDetect",{}, smalltalk.SymbolTest)})},
1929
2178
  args: [],
1930
2179
  source: "testDetect\x0a\x09self assert: (self collection detect: [ :each | each = 'h' ]) = 'h'.\x0a\x09self \x0a\x09\x09should: [ self collection detect: [ :each | each = 'z' ] ]\x0a\x09\x09raise: Error",
1931
2180
  messageSends: ["assert:", "=", "detect:", "collection", "should:raise:"],
@@ -1940,13 +2189,13 @@ selector: "testEquality",
1940
2189
  category: 'tests',
1941
2190
  fn: function (){
1942
2191
  var self=this;
1943
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("hello"),"__eq",[smalltalk.symbolFor("hello")])]);
1944
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.symbolFor("hello"),"__eq",[smalltalk.symbolFor("world")])]);
1945
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("hello"),"__eq",[smalltalk.send(smalltalk.symbolFor("hello"),"_yourself",[])])]);
1946
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"),"_yourself",[]),"__eq",[smalltalk.symbolFor("hello")])]);
1947
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.symbolFor("hello"),"__eq",["hello"])]);
1948
- smalltalk.send(self,"_deny_",[smalltalk.send("hello","__eq",[smalltalk.symbolFor("hello")])]);
1949
- return self},
2192
+ return smalltalk.withContext(function($ctx1) {
2193
+ _st(self)._deny_(_st(smalltalk.symbolFor("hello")).__eq(smalltalk.symbolFor("world")));
2194
+ _st(self)._assert_(_st(smalltalk.symbolFor("hello")).__eq(_st(smalltalk.symbolFor("hello"))._yourself()));
2195
+ _st(self)._assert_(_st(_st(smalltalk.symbolFor("hello"))._yourself()).__eq(smalltalk.symbolFor("hello")));
2196
+ _st(self)._deny_(_st(smalltalk.symbolFor("hello")).__eq("hello"));
2197
+ _st(self)._deny_(_st("hello").__eq(smalltalk.symbolFor("hello")));
2198
+ return self}, function($ctx1) {$ctx1.fill(self,"testEquality",{}, smalltalk.SymbolTest)})},
1950
2199
  args: [],
1951
2200
  source: "testEquality\x0a\x09self assert: #hello = #hello.\x0a\x09self deny: #hello = #world.\x0a\x0a\x09self assert: #hello = #hello yourself.\x0a\x09self assert: #hello yourself = #hello.\x0a\x0a\x09self deny: #hello = 'hello'.\x0a\x09self deny: 'hello' = #hello.",
1952
2201
  messageSends: ["assert:", "=", "deny:", "yourself"],
@@ -1961,11 +2210,11 @@ selector: "testIdentity",
1961
2210
  category: 'tests',
1962
2211
  fn: function (){
1963
2212
  var self=this;
1964
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("hello"),"__eq_eq",[smalltalk.symbolFor("hello")])]);
1965
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.symbolFor("hello"),"__eq_eq",[smalltalk.symbolFor("world")])]);
1966
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("hello"),"__eq",[smalltalk.send(smalltalk.symbolFor("hello"),"_yourself",[])])]);
1967
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"),"_yourself",[]),"__eq",[smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"),"_asString",[]),"_asSymbol",[])])]);
1968
- return self},
2213
+ return smalltalk.withContext(function($ctx1) {
2214
+ _st(self)._deny_(_st(smalltalk.symbolFor("hello")).__eq_eq(smalltalk.symbolFor("world")));
2215
+ _st(self)._assert_(_st(smalltalk.symbolFor("hello")).__eq(_st(smalltalk.symbolFor("hello"))._yourself()));
2216
+ _st(self)._assert_(_st(_st(smalltalk.symbolFor("hello"))._yourself()).__eq(_st(_st(smalltalk.symbolFor("hello"))._asString())._asSymbol()));
2217
+ return self}, function($ctx1) {$ctx1.fill(self,"testIdentity",{}, smalltalk.SymbolTest)})},
1969
2218
  args: [],
1970
2219
  source: "testIdentity\x0a\x09self assert: #hello == #hello.\x0a\x09self deny: #hello == #world.\x0a\x0a\x09self assert: #hello = #hello yourself.\x0a\x09self assert: #hello yourself = #hello asString asSymbol",
1971
2220
  messageSends: ["assert:", "==", "deny:", "=", "yourself", "asSymbol", "asString"],
@@ -1980,9 +2229,9 @@ selector: "testIsEmpty",
1980
2229
  category: 'tests',
1981
2230
  fn: function (){
1982
2231
  var self=this;
1983
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_isEmpty",[])]);
1984
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send("","_asSymbol",[]),"_isEmpty",[])]);
1985
- return self},
2232
+ return smalltalk.withContext(function($ctx1) {
2233
+ _st(self)._assert_(_st(_st("")._asSymbol())._isEmpty());
2234
+ return self}, function($ctx1) {$ctx1.fill(self,"testIsEmpty",{}, smalltalk.SymbolTest)})},
1986
2235
  args: [],
1987
2236
  source: "testIsEmpty\x0a\x09self deny: self collection isEmpty.\x0a\x09self assert: '' asSymbol isEmpty",
1988
2237
  messageSends: ["deny:", "isEmpty", "collection", "assert:", "asSymbol"],
@@ -1997,11 +2246,11 @@ selector: "testIsSymbolIsString",
1997
2246
  category: 'tests',
1998
2247
  fn: function (){
1999
2248
  var self=this;
2000
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.symbolFor("hello"),"_isSymbol",[])]);
2001
- smalltalk.send(self,"_deny_",[smalltalk.send("hello","_isSymbol",[])]);
2002
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.symbolFor("hello"),"_isString",[])]);
2003
- smalltalk.send(self,"_assert_",[smalltalk.send("hello","_isString",[])]);
2004
- return self},
2249
+ return smalltalk.withContext(function($ctx1) {
2250
+ _st(self)._deny_(_st("hello")._isSymbol());
2251
+ _st(self)._deny_(_st(smalltalk.symbolFor("hello"))._isString());
2252
+ _st(self)._assert_(_st("hello")._isString());
2253
+ return self}, function($ctx1) {$ctx1.fill(self,"testIsSymbolIsString",{}, smalltalk.SymbolTest)})},
2005
2254
  args: [],
2006
2255
  source: "testIsSymbolIsString\x0a\x09self assert: #hello isSymbol.\x0a\x09self deny: 'hello' isSymbol.\x0a\x09self deny: #hello isString.\x0a\x09self assert: 'hello' isString",
2007
2256
  messageSends: ["assert:", "isSymbol", "deny:", "isString"],
@@ -2017,11 +2266,11 @@ category: 'tests',
2017
2266
  fn: function (){
2018
2267
  var self=this;
2019
2268
  var newCollection;
2020
- newCollection="o";
2021
- smalltalk.send(self,"_assertSameContents_as_",[smalltalk.send(smalltalk.send(self,"_collection",[]),"_select_",[(function(each){
2022
- return smalltalk.send(each,"__eq",["o"]);
2023
- })]),newCollection]);
2024
- return self},
2269
+ return smalltalk.withContext(function($ctx1) {
2270
+ _st(self)._assertSameContents_as_(_st(_st(self)._collection())._select_((function(each){
2271
+ return smalltalk.withContext(function($ctx2) {
2272
+ }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})),newCollection);
2273
+ return self}, function($ctx1) {$ctx1.fill(self,"testSelect",{newCollection:newCollection}, smalltalk.SymbolTest)})},
2025
2274
  args: [],
2026
2275
  source: "testSelect\x0a\x09| newCollection |\x0a\x09newCollection := 'o'.\x0a\x09self \x0a\x09\x09assertSameContents: (self collection select: [ :each |\x0a\x09\x09\x09each = 'o' ])\x0a\x09\x09as: newCollection",
2027
2276
  messageSends: ["assertSameContents:as:", "select:", "=", "collection"],
@@ -2036,9 +2285,9 @@ selector: "testSize",
2036
2285
  category: 'tests',
2037
2286
  fn: function (){
2038
2287
  var self=this;
2039
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.symbolFor("a"),"_size",[]),(1)]);
2040
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.symbolFor("aaaaa"),"_size",[]),(5)]);
2041
- return self},
2288
+ return smalltalk.withContext(function($ctx1) {
2289
+ _st(self)._assert_equals_(_st(smalltalk.symbolFor("aaaaa"))._size(),(5));
2290
+ return self}, function($ctx1) {$ctx1.fill(self,"testSize",{}, smalltalk.SymbolTest)})},
2042
2291
  args: [],
2043
2292
  source: "testSize\x0a\x09self assert: #a size equals: 1.\x0a\x09self assert: #aaaaa size equals: 5",
2044
2293
  messageSends: ["assert:equals:", "size"],
@@ -2054,8 +2303,10 @@ selector: "collectionClass",
2054
2303
  category: 'accessing',
2055
2304
  fn: function (){
2056
2305
  var self=this;
2057
- return (smalltalk.Symbol || Symbol);
2058
- },
2306
+ return smalltalk.withContext(function($ctx1) {
2307
+ $1=(smalltalk.Symbol || Symbol);
2308
+ return $1;
2309
+ }, function($ctx1) {$ctx1.fill(self,"collectionClass",{}, smalltalk.SymbolTest.klass)})},
2059
2310
  args: [],
2060
2311
  source: "collectionClass\x0a\x09^ Symbol",
2061
2312
  messageSends: [],
@@ -2072,11 +2323,10 @@ selector: "jsObject",
2072
2323
  category: 'accessing',
2073
2324
  fn: function (){
2074
2325
  var self=this;
2075
- return jsObject = {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: ''};
2076
- ;
2077
- return self},
2326
+ return smalltalk.withContext(function($ctx1) {
2327
+ return self}, function($ctx1) {$ctx1.fill(self,"jsObject",{}, smalltalk.JSObjectProxyTest)})},
2078
2328
  args: [],
2079
- source: "jsObject\x0a\x09<return jsObject = {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: ''}>",
2329
+ source: "jsObject\x0a\x09<return jsObject = {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: '', 'e': null}>",
2080
2330
  messageSends: [],
2081
2331
  referencedClasses: []
2082
2332
  }),
@@ -2089,10 +2339,10 @@ selector: "testDNU",
2089
2339
  category: 'tests',
2090
2340
  fn: function (){
2091
2341
  var self=this;
2092
- smalltalk.send(self,"_should_raise_",[(function(){
2093
- return smalltalk.send(smalltalk.send(self,"_jsObject",[]),"_foo",[]);
2094
- }),(smalltalk.MessageNotUnderstood || MessageNotUnderstood)]);
2095
- return self},
2342
+ return smalltalk.withContext(function($ctx1) {
2343
+ return smalltalk.withContext(function($ctx2) {
2344
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2345
+ return self}, function($ctx1) {$ctx1.fill(self,"testDNU",{}, smalltalk.JSObjectProxyTest)})},
2096
2346
  args: [],
2097
2347
  source: "testDNU\x0a\x09self should: [self jsObject foo] raise: MessageNotUnderstood",
2098
2348
  messageSends: ["should:raise:", "foo", "jsObject"],
@@ -2107,10 +2357,10 @@ selector: "testMessageSend",
2107
2357
  category: 'tests',
2108
2358
  fn: function (){
2109
2359
  var self=this;
2110
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send(self,"_jsObject",[]),"_a",[]),(1)]);
2111
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send(self,"_jsObject",[]),"_b",[]),(2)]);
2112
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send(self,"_jsObject",[]),"_c_",[(3)]),(3)]);
2113
- return self},
2360
+ return smalltalk.withContext(function($ctx1) {
2361
+ _st(self)._assert_equals_(_st(_st(self)._jsObject())._b(),(2));
2362
+ _st(self)._assert_equals_(_st(_st(self)._jsObject())._c_((3)),(3));
2363
+ return self}, function($ctx1) {$ctx1.fill(self,"testMessageSend",{}, smalltalk.JSObjectProxyTest)})},
2114
2364
  args: [],
2115
2365
  source: "testMessageSend\x0a\x0a\x09self assert: self jsObject a equals: 1.\x0a\x09self assert: self jsObject b equals: 2.\x0a\x09self assert: (self jsObject c: 3) equals: 3",
2116
2366
  messageSends: ["assert:equals:", "a", "jsObject", "b", "c:"],
@@ -2125,8 +2375,8 @@ selector: "testMethodWithArguments",
2125
2375
  category: 'tests',
2126
2376
  fn: function (){
2127
2377
  var self=this;
2128
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send(self,"_jsObject",[]),"_c_",[(1)]),(1)]);
2129
- return self},
2378
+ return smalltalk.withContext(function($ctx1) {
2379
+ return self}, function($ctx1) {$ctx1.fill(self,"testMethodWithArguments",{}, smalltalk.JSObjectProxyTest)})},
2130
2380
  args: [],
2131
2381
  source: "testMethodWithArguments\x0a\x09self assert: (self jsObject c: 1) equals: 1",
2132
2382
  messageSends: ["assert:equals:", "c:", "jsObject"],
@@ -2141,8 +2391,8 @@ selector: "testPrinting",
2141
2391
  category: 'tests',
2142
2392
  fn: function (){
2143
2393
  var self=this;
2144
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_jsObject",[]),"_printString",[]),"__eq",["[object Object]"])]);
2145
- return self},
2394
+ return smalltalk.withContext(function($ctx1) {
2395
+ return self}, function($ctx1) {$ctx1.fill(self,"testPrinting",{}, smalltalk.JSObjectProxyTest)})},
2146
2396
  args: [],
2147
2397
  source: "testPrinting\x0a\x09self assert: self jsObject printString = '[object Object]'",
2148
2398
  messageSends: ["assert:", "=", "printString", "jsObject"],
@@ -2158,11 +2408,11 @@ category: 'tests',
2158
2408
  fn: function (){
2159
2409
  var self=this;
2160
2410
  var object;
2161
- object=smalltalk.send(self,"_jsObject",[]);
2162
- smalltalk.send(self,"_assert_equals_",["",smalltalk.send(object,"_d",[])]);
2163
- smalltalk.send(object,"_d_",["hello"]);
2164
- smalltalk.send(self,"_assert_equals_",["hello",smalltalk.send(object,"_d",[])]);
2165
- return self},
2411
+ return smalltalk.withContext(function($ctx1) {
2412
+ _st(self)._assert_equals_("",_st(object)._d());
2413
+ _st(object)._d_("hello");
2414
+ _st(self)._assert_equals_("hello",_st(object)._d());
2415
+ return self}, function($ctx1) {$ctx1.fill(self,"testPropertyThatReturnsEmptyString",{object:object}, smalltalk.JSObjectProxyTest)})},
2166
2416
  args: [],
2167
2417
  source: "testPropertyThatReturnsEmptyString\x0a\x09| object |\x0a\x0a\x09object := self jsObject.\x0a\x09self assert: '' equals: object d.\x0a\x0a\x09object d: 'hello'.\x0a\x09self assert: 'hello' equals: object d",
2168
2418
  messageSends: ["jsObject", "assert:equals:", "d", "d:"],
@@ -2170,6 +2420,27 @@ referencedClasses: []
2170
2420
  }),
2171
2421
  smalltalk.JSObjectProxyTest);
2172
2422
 
2423
+ smalltalk.addMethod(
2424
+ "_testPropertyThatReturnsUndefined",
2425
+ smalltalk.method({
2426
+ selector: "testPropertyThatReturnsUndefined",
2427
+ category: 'tests',
2428
+ fn: function (){
2429
+ var self=this;
2430
+ var object;
2431
+ return smalltalk.withContext(function($ctx1) {
2432
+ _st(self)._shouldnt_raise_((function(){
2433
+ return smalltalk.withContext(function($ctx2) {
2434
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2435
+ _st(self)._assert_(_st(_st(object)._e())._isNil());
2436
+ return self}, function($ctx1) {$ctx1.fill(self,"testPropertyThatReturnsUndefined",{object:object}, smalltalk.JSObjectProxyTest)})},
2437
+ args: [],
2438
+ source: "testPropertyThatReturnsUndefined\x0a\x09| object |\x0a\x0a\x09object := self jsObject.\x0a\x09self shouldnt: [ object e ] raise: MessageNotUnderstood.\x0a self assert: object e isNil",
2439
+ messageSends: ["jsObject", "shouldnt:raise:", "e", "assert:", "isNil"],
2440
+ referencedClasses: ["MessageNotUnderstood"]
2441
+ }),
2442
+ smalltalk.JSObjectProxyTest);
2443
+
2173
2444
  smalltalk.addMethod(
2174
2445
  "_testYourself",
2175
2446
  smalltalk.method({
@@ -2177,14 +2448,14 @@ selector: "testYourself",
2177
2448
  category: 'tests',
2178
2449
  fn: function (){
2179
2450
  var self=this;
2180
- var $1,$2;
2181
2451
  var object;
2182
- $1=smalltalk.send(self,"_jsObject",[]);
2183
- smalltalk.send($1,"_d_",["test"]);
2184
- $2=smalltalk.send($1,"_yourself",[]);
2452
+ return smalltalk.withContext(function($ctx1) {
2453
+ $1=_st(self)._jsObject();
2454
+ _st($1)._d_("test");
2455
+ $2=_st($1)._yourself();
2185
2456
  object=$2;
2186
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(object,"_d",[]),"test"]);
2187
- return self},
2457
+ _st(self)._assert_equals_(_st(object)._d(),"test");
2458
+ return self}, function($ctx1) {$ctx1.fill(self,"testYourself",{object:object}, smalltalk.JSObjectProxyTest)})},
2188
2459
  args: [],
2189
2460
  source: "testYourself\x0a\x09| object |\x0a\x09object := self jsObject\x0a\x09\x09d: 'test';\x0a\x09\x09yourself.\x0a\x0a\x09self assert: object d equals: 'test'",
2190
2461
  messageSends: ["d:", "jsObject", "yourself", "assert:equals:", "d"],
@@ -2194,6 +2465,63 @@ smalltalk.JSObjectProxyTest);
2194
2465
 
2195
2466
 
2196
2467
 
2468
+ smalltalk.addClass('JavaScriptExceptionTest', smalltalk.TestCase, [], 'Kernel-Tests');
2469
+ smalltalk.addMethod(
2470
+ "_testCatchingException",
2471
+ smalltalk.method({
2472
+ selector: "testCatchingException",
2473
+ category: 'testing',
2474
+ fn: function (){
2475
+ var self=this;
2476
+ return smalltalk.withContext(function($ctx1) {
2477
+ return smalltalk.withContext(function($ctx2) {
2478
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(error){
2479
+ return smalltalk.withContext(function($ctx2) {
2480
+ }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1)})}));
2481
+ return self}, function($ctx1) {$ctx1.fill(self,"testCatchingException",{}, smalltalk.JavaScriptExceptionTest)})},
2482
+ args: [],
2483
+ source: "testCatchingException\x0a\x09[ self throwException ]\x0a \x09\x09on: Error\x0a do: [ :error | \x0a\x09\x09\x09self assert: error exception = 'test' ]",
2484
+ messageSends: ["on:do:", "assert:", "=", "exception", "throwException"],
2485
+ referencedClasses: ["Error"]
2486
+ }),
2487
+ smalltalk.JavaScriptExceptionTest);
2488
+
2489
+ smalltalk.addMethod(
2490
+ "_testRaisingException",
2491
+ smalltalk.method({
2492
+ selector: "testRaisingException",
2493
+ category: 'testing',
2494
+ fn: function (){
2495
+ var self=this;
2496
+ return smalltalk.withContext(function($ctx1) {
2497
+ return smalltalk.withContext(function($ctx2) {
2498
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.JavaScriptException || JavaScriptException));
2499
+ return self}, function($ctx1) {$ctx1.fill(self,"testRaisingException",{}, smalltalk.JavaScriptExceptionTest)})},
2500
+ args: [],
2501
+ source: "testRaisingException\x0a\x09self should: [ self throwException ] raise: JavaScriptException",
2502
+ messageSends: ["should:raise:", "throwException"],
2503
+ referencedClasses: ["JavaScriptException"]
2504
+ }),
2505
+ smalltalk.JavaScriptExceptionTest);
2506
+
2507
+ smalltalk.addMethod(
2508
+ "_throwException",
2509
+ smalltalk.method({
2510
+ selector: "throwException",
2511
+ category: 'helpers',
2512
+ fn: function (){
2513
+ var self=this;
2514
+ return smalltalk.withContext(function($ctx1) {
2515
+ return self}, function($ctx1) {$ctx1.fill(self,"throwException",{}, smalltalk.JavaScriptExceptionTest)})},
2516
+ args: [],
2517
+ source: "throwException\x0a\x09<throw 'test'>",
2518
+ messageSends: [],
2519
+ referencedClasses: []
2520
+ }),
2521
+ smalltalk.JavaScriptExceptionTest);
2522
+
2523
+
2524
+
2197
2525
  smalltalk.addClass('NumberTest', smalltalk.TestCase, [], 'Kernel-Tests');
2198
2526
  smalltalk.addMethod(
2199
2527
  "_testAbs",
@@ -2202,9 +2530,9 @@ selector: "testAbs",
2202
2530
  category: 'tests',
2203
2531
  fn: function (){
2204
2532
  var self=this;
2205
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((4),"_abs",[]),"__eq",[(4)])]);
2206
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((-4),"_abs",[]),"__eq",[(4)])]);
2207
- return self},
2533
+ return smalltalk.withContext(function($ctx1) {
2534
+ _st(self)._assert_(_st(_st((-4))._abs()).__eq((4)));
2535
+ return self}, function($ctx1) {$ctx1.fill(self,"testAbs",{}, smalltalk.NumberTest)})},
2208
2536
  args: [],
2209
2537
  source: "testAbs\x0a\x09self assert: 4 abs = 4.\x0a\x09self assert: -4 abs = 4",
2210
2538
  messageSends: ["assert:", "=", "abs"],
@@ -2219,14 +2547,14 @@ selector: "testArithmetic",
2219
2547
  category: 'tests',
2220
2548
  fn: function (){
2221
2549
  var self=this;
2222
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1.5),"__plus",[(1)]),"__eq",[(2.5)])]);
2223
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((2),"__minus",[(1)]),"__eq",[(1)])]);
2224
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((-2),"__minus",[(1)]),"__eq",[(-3)])]);
2225
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((12),"__slash",[(2)]),"__eq",[(6)])]);
2226
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3),"__star",[(4)]),"__eq",[(12)])]);
2227
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send((1),"__plus",[(2)]),"__star",[(3)]),"__eq",[(9)])]);
2228
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"__plus",[smalltalk.send((2),"__star",[(3)])]),"__eq",[(7)])]);
2229
- return self},
2550
+ return smalltalk.withContext(function($ctx1) {
2551
+ _st(self)._assert_(_st(_st((2)).__minus((1))).__eq((1)));
2552
+ _st(self)._assert_(_st(_st((-2)).__minus((1))).__eq((-3)));
2553
+ _st(self)._assert_(_st(_st((12)).__slash((2))).__eq((6)));
2554
+ _st(self)._assert_(_st(_st((3)).__star((4))).__eq((12)));
2555
+ _st(self)._assert_(_st(_st(_st((1)).__plus((2))).__star((3))).__eq((9)));
2556
+ _st(self)._assert_(_st(_st((1)).__plus(_st((2)).__star((3)))).__eq((7)));
2557
+ return self}, function($ctx1) {$ctx1.fill(self,"testArithmetic",{}, smalltalk.NumberTest)})},
2230
2558
  args: [],
2231
2559
  source: "testArithmetic\x0a\x09\x0a\x09\x22We rely on JS here, so we won't test complex behavior, just check if \x0a\x09message sends are corrects\x22\x0a\x0a\x09self assert: 1.5 + 1 = 2.5.\x0a\x09self assert: 2 - 1 = 1.\x0a\x09self assert: -2 - 1 = -3.\x0a\x09self assert: 12 / 2 = 6.\x0a\x09self assert: 3 * 4 = 12.\x0a\x0a\x09\x22Simple parenthesis and execution order\x22\x0a\x0a\x09self assert: 1 + 2 * 3 = 9.\x0a\x09self assert: 1 + (2 * 3) = 7",
2232
2560
  messageSends: ["assert:", "=", "+", "-", "/", "*"],
@@ -2241,15 +2569,15 @@ selector: "testComparison",
2241
2569
  category: 'tests',
2242
2570
  fn: function (){
2243
2571
  var self=this;
2244
- smalltalk.send(self,"_assert_",[smalltalk.send((3),"__gt",[(2)])]);
2245
- smalltalk.send(self,"_assert_",[smalltalk.send((2),"__lt",[(3)])]);
2246
- smalltalk.send(self,"_deny_",[smalltalk.send((3),"__lt",[(2)])]);
2247
- smalltalk.send(self,"_deny_",[smalltalk.send((2),"__gt",[(3)])]);
2248
- smalltalk.send(self,"_assert_",[smalltalk.send((3),"__gt_eq",[(3)])]);
2249
- smalltalk.send(self,"_assert_",[smalltalk.send((3.1),"__gt_eq",[(3)])]);
2250
- smalltalk.send(self,"_assert_",[smalltalk.send((3),"__lt_eq",[(3)])]);
2251
- smalltalk.send(self,"_assert_",[smalltalk.send((3),"__lt_eq",[(3.1)])]);
2252
- return self},
2572
+ return smalltalk.withContext(function($ctx1) {
2573
+ _st(self)._assert_(_st((2)).__lt((3)));
2574
+ _st(self)._deny_(_st((3)).__lt((2)));
2575
+ _st(self)._deny_(_st((2)).__gt((3)));
2576
+ _st(self)._assert_(_st((3)).__gt_eq((3)));
2577
+ _st(self)._assert_(_st((3.1)).__gt_eq((3)));
2578
+ _st(self)._assert_(_st((3)).__lt_eq((3)));
2579
+ _st(self)._assert_(_st((3)).__lt_eq((3.1)));
2580
+ return self}, function($ctx1) {$ctx1.fill(self,"testComparison",{}, smalltalk.NumberTest)})},
2253
2581
  args: [],
2254
2582
  source: "testComparison\x0a\x0a\x09self assert: 3 > 2.\x0a\x09self assert: 2 < 3.\x0a\x09\x0a\x09self deny: 3 < 2.\x0a\x09self deny: 2 > 3.\x0a\x0a\x09self assert: 3 >= 3.\x0a\x09self assert: 3.1 >= 3.\x0a\x09self assert: 3 <= 3.\x0a\x09self assert: 3 <= 3.1",
2255
2583
  messageSends: ["assert:", ">", "<", "deny:", ">=", "<="],
@@ -2264,9 +2592,9 @@ selector: "testCopying",
2264
2592
  category: 'tests',
2265
2593
  fn: function (){
2266
2594
  var self=this;
2267
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"_copy",[]),"__eq_eq",[(1)])]);
2268
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"_deepCopy",[]),"__eq_eq",[(1)])]);
2269
- return self},
2595
+ return smalltalk.withContext(function($ctx1) {
2596
+ _st(self)._assert_(_st(_st((1))._deepCopy()).__eq_eq((1)));
2597
+ return self}, function($ctx1) {$ctx1.fill(self,"testCopying",{}, smalltalk.NumberTest)})},
2270
2598
  args: [],
2271
2599
  source: "testCopying\x0a\x09self assert: 1 copy == 1.\x0a\x09self assert: 1 deepCopy == 1",
2272
2600
  messageSends: ["assert:", "==", "copy", "deepCopy"],
@@ -2281,17 +2609,17 @@ selector: "testEquality",
2281
2609
  category: 'tests',
2282
2610
  fn: function (){
2283
2611
  var self=this;
2284
- smalltalk.send(self,"_assert_",[smalltalk.send((1),"__eq",[(1)])]);
2285
- smalltalk.send(self,"_assert_",[smalltalk.send((0),"__eq",[(0)])]);
2286
- smalltalk.send(self,"_deny_",[smalltalk.send((1),"__eq",[(0)])]);
2287
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"_yourself",[]),"__eq",[(1)])]);
2288
- smalltalk.send(self,"_assert_",[smalltalk.send((1),"__eq",[smalltalk.send((1),"_yourself",[])])]);
2289
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"_yourself",[]),"__eq",[smalltalk.send((1),"_yourself",[])])]);
2290
- smalltalk.send(self,"_deny_",[smalltalk.send((0),"__eq",[false])]);
2291
- smalltalk.send(self,"_deny_",[smalltalk.send(false,"__eq",[(0)])]);
2292
- smalltalk.send(self,"_deny_",[smalltalk.send("","__eq",[(0)])]);
2293
- smalltalk.send(self,"_deny_",[smalltalk.send((0),"__eq",[""])]);
2294
- return self},
2612
+ return smalltalk.withContext(function($ctx1) {
2613
+ _st(self)._assert_(_st((0)).__eq((0)));
2614
+ _st(self)._deny_(_st((1)).__eq((0)));
2615
+ _st(self)._assert_(_st(_st((1))._yourself()).__eq((1)));
2616
+ _st(self)._assert_(_st((1)).__eq(_st((1))._yourself()));
2617
+ _st(self)._assert_(_st(_st((1))._yourself()).__eq(_st((1))._yourself()));
2618
+ _st(self)._deny_(_st((0)).__eq(false));
2619
+ _st(self)._deny_(_st(false).__eq((0)));
2620
+ _st(self)._deny_(_st("").__eq((0)));
2621
+ _st(self)._deny_(_st((0)).__eq(""));
2622
+ return self}, function($ctx1) {$ctx1.fill(self,"testEquality",{}, smalltalk.NumberTest)})},
2295
2623
  args: [],
2296
2624
  source: "testEquality\x0a\x09self assert: 1 = 1.\x0a\x09self assert: 0 = 0.\x0a\x09self deny: 1 = 0.\x0a\x0a\x09self assert: 1 yourself = 1.\x0a\x09self assert: 1 = 1 yourself.\x0a\x09self assert: 1 yourself = 1 yourself.\x0a\x09\x0a\x09self deny: 0 = false.\x0a\x09self deny: false = 0.\x0a\x09self deny: '' = 0.\x0a\x09self deny: 0 = ''",
2297
2625
  messageSends: ["assert:", "=", "deny:", "yourself"],
@@ -2299,6 +2627,28 @@ referencedClasses: []
2299
2627
  }),
2300
2628
  smalltalk.NumberTest);
2301
2629
 
2630
+ smalltalk.addMethod(
2631
+ "_testHexNumbers",
2632
+ smalltalk.method({
2633
+ selector: "testHexNumbers",
2634
+ category: 'tests',
2635
+ fn: function (){
2636
+ var self=this;
2637
+ return smalltalk.withContext(function($ctx1) {
2638
+ _st(self)._assert_(_st(_st((10))._truncated()).__eq((10)));
2639
+ _st(self)._assert_(_st(_st((11))._truncated()).__eq((11)));
2640
+ _st(self)._assert_(_st(_st((12))._truncated()).__eq((12)));
2641
+ _st(self)._assert_(_st(_st((13))._truncated()).__eq((13)));
2642
+ _st(self)._assert_(_st(_st((14))._truncated()).__eq((14)));
2643
+ _st(self)._assert_(_st(_st((15))._truncated()).__eq((15)));
2644
+ return self}, function($ctx1) {$ctx1.fill(self,"testHexNumbers",{}, smalltalk.NumberTest)})},
2645
+ args: [],
2646
+ source: "testHexNumbers\x0a\x0a\x09self assert: 16r9 = 9.\x0a\x09self assert: 16rA truncated = 10.\x0a\x09self assert: 16rB truncated = 11.\x0a\x09self assert: 16rC truncated = 12.\x0a\x09self assert: 16rD truncated = 13.\x0a\x09self assert: 16rE truncated = 14.\x0a\x09self assert: 16rF truncated = 15",
2647
+ messageSends: ["assert:", "=", "truncated"],
2648
+ referencedClasses: []
2649
+ }),
2650
+ smalltalk.NumberTest);
2651
+
2302
2652
  smalltalk.addMethod(
2303
2653
  "_testIdentity",
2304
2654
  smalltalk.method({
@@ -2306,14 +2656,14 @@ selector: "testIdentity",
2306
2656
  category: 'tests',
2307
2657
  fn: function (){
2308
2658
  var self=this;
2309
- smalltalk.send(self,"_assert_",[smalltalk.send((1),"__eq_eq",[(1)])]);
2310
- smalltalk.send(self,"_assert_",[smalltalk.send((0),"__eq_eq",[(0)])]);
2311
- smalltalk.send(self,"_deny_",[smalltalk.send((1),"__eq_eq",[(0)])]);
2312
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"_yourself",[]),"__eq_eq",[(1)])]);
2313
- smalltalk.send(self,"_assert_",[smalltalk.send((1),"__eq_eq",[smalltalk.send((1),"_yourself",[])])]);
2314
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((1),"_yourself",[]),"__eq_eq",[smalltalk.send((1),"_yourself",[])])]);
2315
- smalltalk.send(self,"_deny_",[smalltalk.send((1),"__eq_eq",[(2)])]);
2316
- return self},
2659
+ return smalltalk.withContext(function($ctx1) {
2660
+ _st(self)._assert_(_st((0)).__eq_eq((0)));
2661
+ _st(self)._deny_(_st((1)).__eq_eq((0)));
2662
+ _st(self)._assert_(_st(_st((1))._yourself()).__eq_eq((1)));
2663
+ _st(self)._assert_(_st((1)).__eq_eq(_st((1))._yourself()));
2664
+ _st(self)._assert_(_st(_st((1))._yourself()).__eq_eq(_st((1))._yourself()));
2665
+ _st(self)._deny_(_st((1)).__eq_eq((2)));
2666
+ return self}, function($ctx1) {$ctx1.fill(self,"testIdentity",{}, smalltalk.NumberTest)})},
2317
2667
  args: [],
2318
2668
  source: "testIdentity\x0a\x09self assert: 1 == 1.\x0a\x09self assert: 0 == 0.\x0a\x09self deny: 1 == 0.\x0a\x0a\x09self assert: 1 yourself == 1.\x0a\x09self assert: 1 == 1 yourself.\x0a\x09self assert: 1 yourself == 1 yourself.\x0a\x09\x0a\x09self deny: 1 == 2",
2319
2669
  messageSends: ["assert:", "==", "deny:", "yourself"],
@@ -2321,6 +2671,144 @@ referencedClasses: []
2321
2671
  }),
2322
2672
  smalltalk.NumberTest);
2323
2673
 
2674
+ smalltalk.addMethod(
2675
+ "_testInvalidHexNumbers",
2676
+ smalltalk.method({
2677
+ selector: "testInvalidHexNumbers",
2678
+ category: 'tests',
2679
+ fn: function (){
2680
+ var self=this;
2681
+ return smalltalk.withContext(function($ctx1) {
2682
+ return smalltalk.withContext(function($ctx2) {
2683
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2684
+ _st(self)._should_raise_((function(){
2685
+ return smalltalk.withContext(function($ctx2) {
2686
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2687
+ _st(self)._should_raise_((function(){
2688
+ return smalltalk.withContext(function($ctx2) {
2689
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2690
+ _st(self)._should_raise_((function(){
2691
+ return smalltalk.withContext(function($ctx2) {
2692
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2693
+ _st(self)._should_raise_((function(){
2694
+ return smalltalk.withContext(function($ctx2) {
2695
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2696
+ _st(self)._should_raise_((function(){
2697
+ return smalltalk.withContext(function($ctx2) {
2698
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2699
+ _st(self)._should_raise_((function(){
2700
+ return smalltalk.withContext(function($ctx2) {
2701
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2702
+ _st(self)._should_raise_((function(){
2703
+ return smalltalk.withContext(function($ctx2) {
2704
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2705
+ _st(self)._should_raise_((function(){
2706
+ return smalltalk.withContext(function($ctx2) {
2707
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2708
+ _st(self)._should_raise_((function(){
2709
+ return smalltalk.withContext(function($ctx2) {
2710
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2711
+ _st(self)._should_raise_((function(){
2712
+ return smalltalk.withContext(function($ctx2) {
2713
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2714
+ _st(self)._should_raise_((function(){
2715
+ return smalltalk.withContext(function($ctx2) {
2716
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2717
+ _st(self)._should_raise_((function(){
2718
+ return smalltalk.withContext(function($ctx2) {
2719
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2720
+ _st(self)._should_raise_((function(){
2721
+ return smalltalk.withContext(function($ctx2) {
2722
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2723
+ _st(self)._should_raise_((function(){
2724
+ return smalltalk.withContext(function($ctx2) {
2725
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2726
+ _st(self)._should_raise_((function(){
2727
+ return smalltalk.withContext(function($ctx2) {
2728
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2729
+ _st(self)._should_raise_((function(){
2730
+ return smalltalk.withContext(function($ctx2) {
2731
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2732
+ _st(self)._should_raise_((function(){
2733
+ return smalltalk.withContext(function($ctx2) {
2734
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2735
+ _st(self)._should_raise_((function(){
2736
+ return smalltalk.withContext(function($ctx2) {
2737
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2738
+ _st(self)._should_raise_((function(){
2739
+ return smalltalk.withContext(function($ctx2) {
2740
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2741
+ _st(self)._should_raise_((function(){
2742
+ return smalltalk.withContext(function($ctx2) {
2743
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2744
+ _st(self)._should_raise_((function(){
2745
+ return smalltalk.withContext(function($ctx2) {
2746
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2747
+ _st(self)._should_raise_((function(){
2748
+ return smalltalk.withContext(function($ctx2) {
2749
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2750
+ _st(self)._should_raise_((function(){
2751
+ return smalltalk.withContext(function($ctx2) {
2752
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2753
+ _st(self)._should_raise_((function(){
2754
+ return smalltalk.withContext(function($ctx2) {
2755
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2756
+ _st(self)._should_raise_((function(){
2757
+ return smalltalk.withContext(function($ctx2) {
2758
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2759
+ _st(self)._should_raise_((function(){
2760
+ return smalltalk.withContext(function($ctx2) {
2761
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2762
+ _st(self)._should_raise_((function(){
2763
+ return smalltalk.withContext(function($ctx2) {
2764
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2765
+ _st(self)._should_raise_((function(){
2766
+ return smalltalk.withContext(function($ctx2) {
2767
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2768
+ _st(self)._should_raise_((function(){
2769
+ return smalltalk.withContext(function($ctx2) {
2770
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2771
+ _st(self)._should_raise_((function(){
2772
+ return smalltalk.withContext(function($ctx2) {
2773
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2774
+ _st(self)._should_raise_((function(){
2775
+ return smalltalk.withContext(function($ctx2) {
2776
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2777
+ _st(self)._should_raise_((function(){
2778
+ return smalltalk.withContext(function($ctx2) {
2779
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2780
+ _st(self)._should_raise_((function(){
2781
+ return smalltalk.withContext(function($ctx2) {
2782
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2783
+ _st(self)._should_raise_((function(){
2784
+ return smalltalk.withContext(function($ctx2) {
2785
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2786
+ _st(self)._should_raise_((function(){
2787
+ return smalltalk.withContext(function($ctx2) {
2788
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2789
+ _st(self)._should_raise_((function(){
2790
+ return smalltalk.withContext(function($ctx2) {
2791
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2792
+ _st(self)._should_raise_((function(){
2793
+ return smalltalk.withContext(function($ctx2) {
2794
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2795
+ _st(self)._should_raise_((function(){
2796
+ return smalltalk.withContext(function($ctx2) {
2797
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2798
+ _st(self)._should_raise_((function(){
2799
+ return smalltalk.withContext(function($ctx2) {
2800
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2801
+ _st(self)._should_raise_((function(){
2802
+ return smalltalk.withContext(function($ctx2) {
2803
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
2804
+ return self}, function($ctx1) {$ctx1.fill(self,"testInvalidHexNumbers",{}, smalltalk.NumberTest)})},
2805
+ args: [],
2806
+ source: "testInvalidHexNumbers\x0a\x0a\x09self should: [16rG] raise: MessageNotUnderstood.\x0a \x09self should: [16rg] raise: MessageNotUnderstood.\x0a\x09self should: [16rH] raise: MessageNotUnderstood.\x0a \x09self should: [16rh] raise: MessageNotUnderstood.\x0a\x09self should: [16rI] raise: MessageNotUnderstood.\x0a \x09self should: [16ri] raise: MessageNotUnderstood.\x0a\x09self should: [16rJ] raise: MessageNotUnderstood.\x0a \x09self should: [16rj] raise: MessageNotUnderstood.\x0a\x09self should: [16rK] raise: MessageNotUnderstood.\x0a \x09self should: [16rk] raise: MessageNotUnderstood.\x0a\x09self should: [16rL] raise: MessageNotUnderstood.\x0a \x09self should: [16rl] raise: MessageNotUnderstood.\x0a\x09self should: [16rM] raise: MessageNotUnderstood.\x0a \x09self should: [16rm] raise: MessageNotUnderstood.\x0a\x09self should: [16rN] raise: MessageNotUnderstood.\x0a \x09self should: [16rn] raise: MessageNotUnderstood.\x0a\x09self should: [16rO] raise: MessageNotUnderstood.\x0a \x09self should: [16ro] raise: MessageNotUnderstood.\x0a\x09self should: [16rP] raise: MessageNotUnderstood.\x0a \x09self should: [16rp] raise: MessageNotUnderstood.\x0a\x09self should: [16rQ] raise: MessageNotUnderstood.\x0a \x09self should: [16rq] raise: MessageNotUnderstood.\x0a\x09self should: [16rR] raise: MessageNotUnderstood.\x0a \x09self should: [16rr] raise: MessageNotUnderstood.\x0a\x09self should: [16rS] raise: MessageNotUnderstood.\x0a \x09self should: [16rs] raise: MessageNotUnderstood.\x0a\x09self should: [16rT] raise: MessageNotUnderstood.\x0a \x09self should: [16rt] raise: MessageNotUnderstood.\x0a\x09self should: [16rU] raise: MessageNotUnderstood.\x0a \x09self should: [16ru] raise: MessageNotUnderstood.\x0a\x09self should: [16rV] raise: MessageNotUnderstood.\x0a \x09self should: [16rv] raise: MessageNotUnderstood.\x0a\x09self should: [16rW] raise: MessageNotUnderstood.\x0a \x09self should: [16rw] raise: MessageNotUnderstood.\x0a\x09self should: [16rX] raise: MessageNotUnderstood.\x0a \x09self should: [16rx] raise: MessageNotUnderstood.\x0a\x09self should: [16rY] raise: MessageNotUnderstood.\x0a \x09self should: [16ry] raise: MessageNotUnderstood.\x0a\x09self should: [16rZ] raise: MessageNotUnderstood.\x0a \x09self should: [16rz] raise: MessageNotUnderstood.\x0a self should: [16rABcdEfZ] raise: MessageNotUnderstood.",
2807
+ messageSends: ["should:raise:", "rG", "rg", "rH", "rh", "rI", "ri", "rJ", "rj", "rK", "rk", "rL", "rl", "rM", "rm", "rN", "rn", "rO", "ro", "rP", "rp", "rQ", "rq", "rR", "rr", "rS", "rs", "rT", "rt", "rU", "ru", "rV", "rv", "rW", "rw", "rX", "rx", "rY", "ry", "rZ", "rz", "Z"],
2808
+ referencedClasses: ["MessageNotUnderstood"]
2809
+ }),
2810
+ smalltalk.NumberTest);
2811
+
2324
2812
  smalltalk.addMethod(
2325
2813
  "_testMinMax",
2326
2814
  smalltalk.method({
@@ -2328,9 +2816,9 @@ selector: "testMinMax",
2328
2816
  category: 'tests',
2329
2817
  fn: function (){
2330
2818
  var self=this;
2331
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((2),"_max_",[(5)]),(5)]);
2332
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((2),"_min_",[(5)]),(2)]);
2333
- return self},
2819
+ return smalltalk.withContext(function($ctx1) {
2820
+ _st(self)._assert_equals_(_st((2))._min_((5)),(2));
2821
+ return self}, function($ctx1) {$ctx1.fill(self,"testMinMax",{}, smalltalk.NumberTest)})},
2334
2822
  args: [],
2335
2823
  source: "testMinMax\x0a\x09\x0a\x09self assert: (2 max: 5) equals: 5.\x0a\x09self assert: (2 min: 5) equals: 2",
2336
2824
  messageSends: ["assert:equals:", "max:", "min:"],
@@ -2345,9 +2833,9 @@ selector: "testNegated",
2345
2833
  category: 'tests',
2346
2834
  fn: function (){
2347
2835
  var self=this;
2348
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3),"_negated",[]),"__eq",[(-3)])]);
2349
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((-3),"_negated",[]),"__eq",[(3)])]);
2350
- return self},
2836
+ return smalltalk.withContext(function($ctx1) {
2837
+ _st(self)._assert_(_st(_st((-3))._negated()).__eq((3)));
2838
+ return self}, function($ctx1) {$ctx1.fill(self,"testNegated",{}, smalltalk.NumberTest)})},
2351
2839
  args: [],
2352
2840
  source: "testNegated\x0a\x09self assert: 3 negated = -3.\x0a\x09self assert: -3 negated = 3",
2353
2841
  messageSends: ["assert:", "=", "negated"],
@@ -2362,20 +2850,20 @@ selector: "testPrintShowingDecimalPlaces",
2362
2850
  category: 'tests',
2363
2851
  fn: function (){
2364
2852
  var self=this;
2365
- smalltalk.send(self,"_assert_equals_",["23.00",smalltalk.send((23),"_printShowingDecimalPlaces_",[(2)])]);
2366
- smalltalk.send(self,"_assert_equals_",["23.57",smalltalk.send((23.5698),"_printShowingDecimalPlaces_",[(2)])]);
2367
- smalltalk.send(self,"_assert_equals_",["-234.56700",smalltalk.send(smalltalk.send((234.567),"_negated",[]),"_printShowingDecimalPlaces_",[(5)])]);
2368
- smalltalk.send(self,"_assert_equals_",["23",smalltalk.send((23.4567),"_printShowingDecimalPlaces_",[(0)])]);
2369
- smalltalk.send(self,"_assert_equals_",["24",smalltalk.send((23.5567),"_printShowingDecimalPlaces_",[(0)])]);
2370
- smalltalk.send(self,"_assert_equals_",["-23",smalltalk.send(smalltalk.send((23.4567),"_negated",[]),"_printShowingDecimalPlaces_",[(0)])]);
2371
- smalltalk.send(self,"_assert_equals_",["-24",smalltalk.send(smalltalk.send((23.5567),"_negated",[]),"_printShowingDecimalPlaces_",[(0)])]);
2372
- smalltalk.send(self,"_assert_equals_",["100000000.0",smalltalk.send((100000000),"_printShowingDecimalPlaces_",[(1)])]);
2373
- smalltalk.send(self,"_assert_equals_",["0.98000",smalltalk.send((0.98),"_printShowingDecimalPlaces_",[(5)])]);
2374
- smalltalk.send(self,"_assert_equals_",["-0.98",smalltalk.send(smalltalk.send((0.98),"_negated",[]),"_printShowingDecimalPlaces_",[(2)])]);
2375
- smalltalk.send(self,"_assert_equals_",["2.57",smalltalk.send((2.567),"_printShowingDecimalPlaces_",[(2)])]);
2376
- smalltalk.send(self,"_assert_equals_",["-2.57",smalltalk.send((-2.567),"_printShowingDecimalPlaces_",[(2)])]);
2377
- smalltalk.send(self,"_assert_equals_",["0.00",smalltalk.send((0),"_printShowingDecimalPlaces_",[(2)])]);
2378
- return self},
2853
+ return smalltalk.withContext(function($ctx1) {
2854
+ _st(self)._assert_equals_("23.57",_st((23.5698))._printShowingDecimalPlaces_((2)));
2855
+ _st(self)._assert_equals_("-234.56700",_st(_st((234.567))._negated())._printShowingDecimalPlaces_((5)));
2856
+ _st(self)._assert_equals_("23",_st((23.4567))._printShowingDecimalPlaces_((0)));
2857
+ _st(self)._assert_equals_("24",_st((23.5567))._printShowingDecimalPlaces_((0)));
2858
+ _st(self)._assert_equals_("-23",_st(_st((23.4567))._negated())._printShowingDecimalPlaces_((0)));
2859
+ _st(self)._assert_equals_("-24",_st(_st((23.5567))._negated())._printShowingDecimalPlaces_((0)));
2860
+ _st(self)._assert_equals_("100000000.0",_st((100000000))._printShowingDecimalPlaces_((1)));
2861
+ _st(self)._assert_equals_("0.98000",_st((0.98))._printShowingDecimalPlaces_((5)));
2862
+ _st(self)._assert_equals_("-0.98",_st(_st((0.98))._negated())._printShowingDecimalPlaces_((2)));
2863
+ _st(self)._assert_equals_("2.57",_st((2.567))._printShowingDecimalPlaces_((2)));
2864
+ _st(self)._assert_equals_("-2.57",_st((-2.567))._printShowingDecimalPlaces_((2)));
2865
+ _st(self)._assert_equals_("0.00",_st((0))._printShowingDecimalPlaces_((2)));
2866
+ return self}, function($ctx1) {$ctx1.fill(self,"testPrintShowingDecimalPlaces",{}, smalltalk.NumberTest)})},
2379
2867
  args: [],
2380
2868
  source: "testPrintShowingDecimalPlaces\x0a\x09self assert: '23.00' equals: (23 printShowingDecimalPlaces: 2).\x0a\x09self assert: '23.57' equals: (23.5698 printShowingDecimalPlaces: 2).\x0a\x09self assert: '-234.56700' equals:( 234.567 negated printShowingDecimalPlaces: 5).\x0a\x09self assert: '23' equals: (23.4567 printShowingDecimalPlaces: 0).\x0a\x09self assert: '24' equals: (23.5567 printShowingDecimalPlaces: 0).\x0a\x09self assert: '-23' equals: (23.4567 negated printShowingDecimalPlaces: 0).\x0a\x09self assert: '-24' equals: (23.5567 negated printShowingDecimalPlaces: 0).\x0a\x09self assert: '100000000.0' equals: (100000000 printShowingDecimalPlaces: 1).\x0a\x09self assert: '0.98000' equals: (0.98 printShowingDecimalPlaces: 5).\x0a\x09self assert: '-0.98' equals: (0.98 negated printShowingDecimalPlaces: 2).\x0a\x09self assert: '2.57' equals: (2.567 printShowingDecimalPlaces: 2).\x0a\x09self assert: '-2.57' equals: (-2.567 printShowingDecimalPlaces: 2).\x0a\x09self assert: '0.00' equals: (0 printShowingDecimalPlaces: 2).",
2381
2869
  messageSends: ["assert:equals:", "printShowingDecimalPlaces:", "negated"],
@@ -2390,10 +2878,10 @@ selector: "testRounded",
2390
2878
  category: 'tests',
2391
2879
  fn: function (){
2392
2880
  var self=this;
2393
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3),"_rounded",[]),"__eq",[(3)])]);
2394
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3.212),"_rounded",[]),"__eq",[(3)])]);
2395
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3.51),"_rounded",[]),"__eq",[(4)])]);
2396
- return self},
2881
+ return smalltalk.withContext(function($ctx1) {
2882
+ _st(self)._assert_(_st(_st((3.212))._rounded()).__eq((3)));
2883
+ _st(self)._assert_(_st(_st((3.51))._rounded()).__eq((4)));
2884
+ return self}, function($ctx1) {$ctx1.fill(self,"testRounded",{}, smalltalk.NumberTest)})},
2397
2885
  args: [],
2398
2886
  source: "testRounded\x0a\x09\x0a\x09self assert: 3 rounded = 3.\x0a\x09self assert: 3.212 rounded = 3.\x0a\x09self assert: 3.51 rounded = 4",
2399
2887
  messageSends: ["assert:", "=", "rounded"],
@@ -2408,9 +2896,9 @@ selector: "testSqrt",
2408
2896
  category: 'tests',
2409
2897
  fn: function (){
2410
2898
  var self=this;
2411
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((4),"_sqrt",[]),"__eq",[(2)])]);
2412
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((16),"_sqrt",[]),"__eq",[(4)])]);
2413
- return self},
2899
+ return smalltalk.withContext(function($ctx1) {
2900
+ _st(self)._assert_(_st(_st((16))._sqrt()).__eq((4)));
2901
+ return self}, function($ctx1) {$ctx1.fill(self,"testSqrt",{}, smalltalk.NumberTest)})},
2414
2902
  args: [],
2415
2903
  source: "testSqrt\x0a\x09\x0a\x09self assert: 4 sqrt = 2.\x0a\x09self assert: 16 sqrt = 4",
2416
2904
  messageSends: ["assert:", "=", "sqrt"],
@@ -2425,8 +2913,8 @@ selector: "testSquared",
2425
2913
  category: 'tests',
2426
2914
  fn: function (){
2427
2915
  var self=this;
2428
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((4),"_squared",[]),"__eq",[(16)])]);
2429
- return self},
2916
+ return smalltalk.withContext(function($ctx1) {
2917
+ return self}, function($ctx1) {$ctx1.fill(self,"testSquared",{}, smalltalk.NumberTest)})},
2430
2918
  args: [],
2431
2919
  source: "testSquared\x0a\x09\x0a\x09self assert: 4 squared = 16",
2432
2920
  messageSends: ["assert:", "=", "squared"],
@@ -2442,18 +2930,18 @@ category: 'tests',
2442
2930
  fn: function (){
2443
2931
  var self=this;
2444
2932
  var i;
2445
- i=(0);
2446
- smalltalk.send((0),"_timesRepeat_",[(function(){
2447
- i=smalltalk.send(i,"__plus",[(1)]);
2933
+ return smalltalk.withContext(function($ctx1) {
2934
+ _st((0))._timesRepeat_((function(){
2935
+ return smalltalk.withContext(function($ctx2) {
2448
2936
  return i;
2449
- })]);
2450
- smalltalk.send(self,"_assert_equals_",[i,(0)]);
2451
- smalltalk.send((5),"_timesRepeat_",[(function(){
2452
- i=smalltalk.send(i,"__plus",[(1)]);
2937
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2938
+ _st(self)._assert_equals_(i,(0));
2939
+ _st((5))._timesRepeat_((function(){
2940
+ return smalltalk.withContext(function($ctx2) {
2453
2941
  return i;
2454
- })]);
2455
- smalltalk.send(self,"_assert_equals_",[i,(5)]);
2456
- return self},
2942
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
2943
+ _st(self)._assert_equals_(i,(5));
2944
+ return self}, function($ctx1) {$ctx1.fill(self,"testTimesRepeat",{i:i}, smalltalk.NumberTest)})},
2457
2945
  args: [],
2458
2946
  source: "testTimesRepeat\x0a\x09| i |\x0a\x0a\x09i := 0.\x0a\x090 timesRepeat: [i := i + 1].\x0a\x09self assert: i equals: 0.\x0a\x0a\x095 timesRepeat: [i := i + 1].\x0a\x09self assert: i equals: 5",
2459
2947
  messageSends: ["timesRepeat:", "+", "assert:equals:"],
@@ -2468,8 +2956,8 @@ selector: "testTo",
2468
2956
  category: 'tests',
2469
2957
  fn: function (){
2470
2958
  var self=this;
2471
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((1),"_to_",[(5)]),[(1), (2), (3), (4), (5)]]);
2472
- return self},
2959
+ return smalltalk.withContext(function($ctx1) {
2960
+ return self}, function($ctx1) {$ctx1.fill(self,"testTo",{}, smalltalk.NumberTest)})},
2473
2961
  args: [],
2474
2962
  source: "testTo\x0a\x09self assert: (1 to: 5) equals: #(1 2 3 4 5)",
2475
2963
  messageSends: ["assert:equals:", "to:"],
@@ -2484,11 +2972,11 @@ selector: "testToBy",
2484
2972
  category: 'tests',
2485
2973
  fn: function (){
2486
2974
  var self=this;
2487
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((0),"_to_by_",[(6),(2)]),[(0), (2), (4), (6)]]);
2488
- smalltalk.send(self,"_should_raise_",[(function(){
2489
- return smalltalk.send((1),"_to_by_",[(4),(0)]);
2490
- }),(smalltalk.Error || Error)]);
2491
- return self},
2975
+ return smalltalk.withContext(function($ctx1) {
2976
+ _st(self)._should_raise_((function(){
2977
+ return smalltalk.withContext(function($ctx2) {
2978
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
2979
+ return self}, function($ctx1) {$ctx1.fill(self,"testToBy",{}, smalltalk.NumberTest)})},
2492
2980
  args: [],
2493
2981
  source: "testToBy\x0a\x09self assert: (0 to: 6 by: 2) equals: #(0 2 4 6).\x0a\x0a\x09self should: [1 to: 4 by: 0] raise: Error",
2494
2982
  messageSends: ["assert:equals:", "to:by:", "should:raise:"],
@@ -2503,10 +2991,10 @@ selector: "testTruncated",
2503
2991
  category: 'tests',
2504
2992
  fn: function (){
2505
2993
  var self=this;
2506
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3),"_truncated",[]),"__eq",[(3)])]);
2507
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3.212),"_truncated",[]),"__eq",[(3)])]);
2508
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3.51),"_truncated",[]),"__eq",[(3)])]);
2509
- return self},
2994
+ return smalltalk.withContext(function($ctx1) {
2995
+ _st(self)._assert_(_st(_st((3.212))._truncated()).__eq((3)));
2996
+ _st(self)._assert_(_st(_st((3.51))._truncated()).__eq((3)));
2997
+ return self}, function($ctx1) {$ctx1.fill(self,"testTruncated",{}, smalltalk.NumberTest)})},
2510
2998
  args: [],
2511
2999
  source: "testTruncated\x0a\x09\x0a\x09self assert: 3 truncated = 3.\x0a\x09self assert: 3.212 truncated = 3.\x0a\x09self assert: 3.51 truncated = 3",
2512
3000
  messageSends: ["assert:", "=", "truncated"],
@@ -2517,6 +3005,7 @@ smalltalk.NumberTest);
2517
3005
 
2518
3006
 
2519
3007
  smalltalk.addClass('ObjectMock', smalltalk.Object, ['foo', 'bar'], 'Kernel-Tests');
3008
+ smalltalk.ObjectMock.comment="ObjectMock is there only to perform tests on classes."
2520
3009
  smalltalk.addMethod(
2521
3010
  "_foo",
2522
3011
  smalltalk.method({
@@ -2524,8 +3013,10 @@ selector: "foo",
2524
3013
  category: 'not yet classified',
2525
3014
  fn: function (){
2526
3015
  var self=this;
2527
- return self["@foo"];
2528
- },
3016
+ return smalltalk.withContext(function($ctx1) {
3017
+ $1=self["@foo"];
3018
+ return $1;
3019
+ }, function($ctx1) {$ctx1.fill(self,"foo",{}, smalltalk.ObjectMock)})},
2529
3020
  args: [],
2530
3021
  source: "foo\x0a\x09^foo",
2531
3022
  messageSends: [],
@@ -2540,8 +3031,8 @@ selector: "foo:",
2540
3031
  category: 'not yet classified',
2541
3032
  fn: function (anObject){
2542
3033
  var self=this;
2543
- self["@foo"]=anObject;
2544
- return self},
3034
+ return smalltalk.withContext(function($ctx1) {
3035
+ return self}, function($ctx1) {$ctx1.fill(self,"foo:",{anObject:anObject}, smalltalk.ObjectMock)})},
2545
3036
  args: ["anObject"],
2546
3037
  source: "foo: anObject\x0a\x09foo := anObject",
2547
3038
  messageSends: [],
@@ -2552,6 +3043,22 @@ smalltalk.ObjectMock);
2552
3043
 
2553
3044
 
2554
3045
  smalltalk.addClass('ObjectTest', smalltalk.TestCase, [], 'Kernel-Tests');
3046
+ smalltalk.addMethod(
3047
+ "_notDefined",
3048
+ smalltalk.method({
3049
+ selector: "notDefined",
3050
+ category: 'tests',
3051
+ fn: function (){
3052
+ var self=this;
3053
+ return smalltalk.withContext(function($ctx1) {
3054
+ return self}, function($ctx1) {$ctx1.fill(self,"notDefined",{}, smalltalk.ObjectTest)})},
3055
+ args: [],
3056
+ source: "notDefined\x0a\x09<return undefined;>",
3057
+ messageSends: [],
3058
+ referencedClasses: []
3059
+ }),
3060
+ smalltalk.ObjectTest);
3061
+
2555
3062
  smalltalk.addMethod(
2556
3063
  "_testBasicAccess",
2557
3064
  smalltalk.method({
@@ -2560,11 +3067,11 @@ category: 'tests',
2560
3067
  fn: function (){
2561
3068
  var self=this;
2562
3069
  var o;
2563
- o=smalltalk.send((smalltalk.Object || Object),"_new",[]);
2564
- smalltalk.send(o,"_basicAt_put_",["a",(1)]);
2565
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(o,"_basicAt_",["a"]),(1)]);
2566
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(o,"_basicAt_",["b"]),nil]);
2567
- return self},
3070
+ return smalltalk.withContext(function($ctx1) {
3071
+ _st(o)._basicAt_put_("a",(1));
3072
+ _st(self)._assert_equals_(_st(o)._basicAt_("a"),(1));
3073
+ _st(self)._assert_equals_(_st(o)._basicAt_("b"),nil);
3074
+ return self}, function($ctx1) {$ctx1.fill(self,"testBasicAccess",{o:o}, smalltalk.ObjectTest)})},
2568
3075
  args: [],
2569
3076
  source: "testBasicAccess\x0a\x09| o |\x0a\x09o := Object new.\x0a\x09o basicAt: 'a' put: 1.\x0a\x09self assert: (o basicAt: 'a') equals: 1.\x0a\x09self assert: (o basicAt: 'b') equals: nil",
2570
3077
  messageSends: ["new", "basicAt:put:", "assert:equals:", "basicAt:"],
@@ -2580,16 +3087,16 @@ category: 'tests',
2580
3087
  fn: function (){
2581
3088
  var self=this;
2582
3089
  var o;
2583
- o=smalltalk.send((smalltalk.Object || Object),"_new",[]);
2584
- smalltalk.send(o,"_basicAt_put_",["func",(function(){
2585
- return "hello";
2586
- })]);
2587
- smalltalk.send(o,"_basicAt_put_",["func2",(function(a){
2588
- return smalltalk.send(a,"__plus",[(1)]);
2589
- })]);
2590
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(o,"_basicPerform_",["func"]),"hello"]);
2591
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(o,"_basicPerform_withArguments_",["func2",[(3)]]),(4)]);
2592
- return self},
3090
+ return smalltalk.withContext(function($ctx1) {
3091
+ _st(o)._basicAt_put_("func",(function(){
3092
+ return smalltalk.withContext(function($ctx2) {
3093
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
3094
+ _st(o)._basicAt_put_("func2",(function(a){
3095
+ return smalltalk.withContext(function($ctx2) {
3096
+ }, function($ctx2) {$ctx2.fillBlock({a:a},$ctx1)})}));
3097
+ _st(self)._assert_equals_(_st(o)._basicPerform_("func"),"hello");
3098
+ _st(self)._assert_equals_(_st(o)._basicPerform_withArguments_("func2",[(3)]),(4));
3099
+ return self}, function($ctx1) {$ctx1.fill(self,"testBasicPerform",{o:o}, smalltalk.ObjectTest)})},
2593
3100
  args: [],
2594
3101
  source: "testBasicPerform\x0a\x09| o |\x0a\x09o := Object new.\x0a\x09o basicAt: 'func' put: ['hello'].\x09\x0a\x09o basicAt: 'func2' put: [:a | a + 1].\x0a\x0a\x09self assert: (o basicPerform: 'func')\x09 equals: 'hello'.\x0a\x09self assert: (o basicPerform: 'func2' withArguments: #(3)) equals: 4",
2595
3102
  messageSends: ["new", "basicAt:put:", "+", "assert:equals:", "basicPerform:", "basicPerform:withArguments:"],
@@ -2604,10 +3111,10 @@ selector: "testDNU",
2604
3111
  category: 'tests',
2605
3112
  fn: function (){
2606
3113
  var self=this;
2607
- smalltalk.send(self,"_should_raise_",[(function(){
2608
- return smalltalk.send(smalltalk.send((smalltalk.Object || Object),"_new",[]),"_foo",[]);
2609
- }),(smalltalk.MessageNotUnderstood || MessageNotUnderstood)]);
2610
- return self},
3114
+ return smalltalk.withContext(function($ctx1) {
3115
+ return smalltalk.withContext(function($ctx2) {
3116
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.MessageNotUnderstood || MessageNotUnderstood));
3117
+ return self}, function($ctx1) {$ctx1.fill(self,"testDNU",{}, smalltalk.ObjectTest)})},
2611
3118
  args: [],
2612
3119
  source: "testDNU\x0a\x09self should: [Object new foo] raise: MessageNotUnderstood",
2613
3120
  messageSends: ["should:raise:", "foo", "new"],
@@ -2623,12 +3130,12 @@ category: 'tests',
2623
3130
  fn: function (){
2624
3131
  var self=this;
2625
3132
  var o;
2626
- o=smalltalk.send((smalltalk.Object || Object),"_new",[]);
2627
- smalltalk.send(self,"_deny_",[smalltalk.send(o,"__eq",[smalltalk.send((smalltalk.Object || Object),"_new",[])])]);
2628
- smalltalk.send(self,"_assert_",[smalltalk.send(o,"__eq",[o])]);
2629
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(o,"_yourself",[]),"__eq",[o])]);
2630
- smalltalk.send(self,"_assert_",[smalltalk.send(o,"__eq",[smalltalk.send(o,"_yourself",[])])]);
2631
- return self},
3133
+ return smalltalk.withContext(function($ctx1) {
3134
+ _st(self)._deny_(_st(o).__eq(_st((smalltalk.Object || Object))._new()));
3135
+ _st(self)._assert_(_st(o).__eq(o));
3136
+ _st(self)._assert_(_st(_st(o)._yourself()).__eq(o));
3137
+ _st(self)._assert_(_st(o).__eq(_st(o)._yourself()));
3138
+ return self}, function($ctx1) {$ctx1.fill(self,"testEquality",{o:o}, smalltalk.ObjectTest)})},
2632
3139
  args: [],
2633
3140
  source: "testEquality\x0a\x09| o |\x0a\x09o := Object new.\x0a\x09self deny: o = Object new.\x0a\x09self assert: o = o.\x0a\x09self assert: o yourself = o.\x0a\x09self assert: o = o yourself",
2634
3141
  messageSends: ["new", "deny:", "=", "assert:", "yourself"],
@@ -2643,10 +3150,10 @@ selector: "testHalt",
2643
3150
  category: 'tests',
2644
3151
  fn: function (){
2645
3152
  var self=this;
2646
- smalltalk.send(self,"_should_raise_",[(function(){
2647
- return smalltalk.send(smalltalk.send((smalltalk.Object || Object),"_new",[]),"_halt",[]);
2648
- }),(smalltalk.Error || Error)]);
2649
- return self},
3153
+ return smalltalk.withContext(function($ctx1) {
3154
+ return smalltalk.withContext(function($ctx2) {
3155
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
3156
+ return self}, function($ctx1) {$ctx1.fill(self,"testHalt",{}, smalltalk.ObjectTest)})},
2650
3157
  args: [],
2651
3158
  source: "testHalt\x0a\x09self should: [Object new halt] raise: Error",
2652
3159
  messageSends: ["should:raise:", "halt", "new"],
@@ -2662,12 +3169,12 @@ category: 'tests',
2662
3169
  fn: function (){
2663
3170
  var self=this;
2664
3171
  var o;
2665
- o=smalltalk.send((smalltalk.Object || Object),"_new",[]);
2666
- smalltalk.send(self,"_deny_",[smalltalk.send(o,"__eq_eq",[smalltalk.send((smalltalk.Object || Object),"_new",[])])]);
2667
- smalltalk.send(self,"_assert_",[smalltalk.send(o,"__eq_eq",[o])]);
2668
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(o,"_yourself",[]),"__eq_eq",[o])]);
2669
- smalltalk.send(self,"_assert_",[smalltalk.send(o,"__eq_eq",[smalltalk.send(o,"_yourself",[])])]);
2670
- return self},
3172
+ return smalltalk.withContext(function($ctx1) {
3173
+ _st(self)._deny_(_st(o).__eq_eq(_st((smalltalk.Object || Object))._new()));
3174
+ _st(self)._assert_(_st(o).__eq_eq(o));
3175
+ _st(self)._assert_(_st(_st(o)._yourself()).__eq_eq(o));
3176
+ _st(self)._assert_(_st(o).__eq_eq(_st(o)._yourself()));
3177
+ return self}, function($ctx1) {$ctx1.fill(self,"testIdentity",{o:o}, smalltalk.ObjectTest)})},
2671
3178
  args: [],
2672
3179
  source: "testIdentity\x0a\x09| o |\x0a\x09o := Object new.\x0a\x09self deny: o == Object new.\x0a\x09self assert: o == o.\x0a\x09self assert: o yourself == o.\x0a\x09self assert: o == o yourself",
2673
3180
  messageSends: ["new", "deny:", "==", "assert:", "yourself"],
@@ -2682,35 +3189,41 @@ selector: "testIfNil",
2682
3189
  category: 'tests',
2683
3190
  fn: function (){
2684
3191
  var self=this;
2685
- var $2,$1,$4,$3,$6,$5;
2686
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send((smalltalk.Object || Object),"_new",[]),"_isNil",[])]);
2687
- $2=smalltalk.send((smalltalk.Object || Object),"_new",[]);
2688
- if(($receiver = $2) == nil || $receiver == undefined){
2689
- $1=true;
2690
- } else {
2691
- $1=$2;
2692
- };
2693
- smalltalk.send(self,"_deny_",[smalltalk.send($1,"__eq",[true])]);
2694
- $4=smalltalk.send((smalltalk.Object || Object),"_new",[]);
3192
+ return smalltalk.withContext(function($ctx1) {
3193
+ _st(self)._deny_(_st(_st((smalltalk.Object || Object))._new())._isNil());
3194
+ $1=self;
3195
+ $4=_st((smalltalk.Object || Object))._new();
2695
3196
  if(($receiver = $4) == nil || $receiver == undefined){
3197
+ $3=true;
3198
+ } else {
2696
3199
  $3=$4;
3200
+ };
3201
+ $2=_st($3).__eq(true);
3202
+ _st($1)._deny_($2);
3203
+ $5=self;
3204
+ $8=_st((smalltalk.Object || Object))._new();
3205
+ if(($receiver = $8) == nil || $receiver == undefined){
3206
+ $7=$8;
2697
3207
  } else {
2698
- $3=true;
3208
+ $7=true;
2699
3209
  };
2700
- smalltalk.send(self,"_assert_",[smalltalk.send($3,"__eq",[true])]);
2701
- $6=smalltalk.send((smalltalk.Object || Object),"_new",[]);
2702
- if(($receiver = $6) == nil || $receiver == undefined){
2703
- $5=false;
3210
+ $6=_st($7).__eq(true);
3211
+ _st($5)._assert_($6);
3212
+ $9=self;
3213
+ $12=_st((smalltalk.Object || Object))._new();
3214
+ if(($receiver = $12) == nil || $receiver == undefined){
3215
+ $11=false;
2704
3216
  } else {
2705
- $5=true;
3217
+ $11=true;
2706
3218
  };
2707
- smalltalk.send(self,"_assert_",[smalltalk.send($5,"__eq",[true])]);
2708
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Object || Object),"_new",[]),"_ifNotNil_ifNil_",[(function(){
2709
- return true;
2710
- }),(function(){
2711
- return false;
2712
- })]),"__eq",[true])]);
2713
- return self},
3219
+ $10=_st($11).__eq(true);
3220
+ _st($9)._assert_($10);
3221
+ _st(self)._assert_(_st(_st(_st((smalltalk.Object || Object))._new())._ifNotNil_ifNil_((function(){
3222
+ return smalltalk.withContext(function($ctx2) {
3223
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
3224
+ return smalltalk.withContext(function($ctx2) {
3225
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq(true));
3226
+ return self}, function($ctx1) {$ctx1.fill(self,"testIfNil",{}, smalltalk.ObjectTest)})},
2714
3227
  args: [],
2715
3228
  source: "testIfNil\x0a\x09self deny: Object new isNil.\x0a\x09self deny: (Object new ifNil: [true]) = true.\x0a\x09self assert: (Object new ifNotNil: [true]) = true.\x0a\x0a\x09self assert: (Object new ifNil: [false] ifNotNil: [true]) = true.\x0a\x09self assert: (Object new ifNotNil: [true] ifNil: [false]) = true",
2716
3229
  messageSends: ["deny:", "isNil", "new", "=", "ifNil:", "assert:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"],
@@ -2726,12 +3239,12 @@ category: 'tests',
2726
3239
  fn: function (){
2727
3240
  var self=this;
2728
3241
  var o;
2729
- o=smalltalk.send((smalltalk.ObjectMock || ObjectMock),"_new",[]);
2730
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(o,"_instVarAt_",[smalltalk.symbolFor("foo")]),nil]);
2731
- smalltalk.send(o,"_instVarAt_put_",[smalltalk.symbolFor("foo"),(1)]);
2732
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(o,"_instVarAt_",[smalltalk.symbolFor("foo")]),(1)]);
2733
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(o,"_instVarAt_",["foo"]),(1)]);
2734
- return self},
3242
+ return smalltalk.withContext(function($ctx1) {
3243
+ _st(self)._assert_equals_(_st(o)._instVarAt_(smalltalk.symbolFor("foo")),nil);
3244
+ _st(o)._instVarAt_put_(smalltalk.symbolFor("foo"),(1));
3245
+ _st(self)._assert_equals_(_st(o)._instVarAt_(smalltalk.symbolFor("foo")),(1));
3246
+ _st(self)._assert_equals_(_st(o)._instVarAt_("foo"),(1));
3247
+ return self}, function($ctx1) {$ctx1.fill(self,"testInstVars",{o:o}, smalltalk.ObjectTest)})},
2735
3248
  args: [],
2736
3249
  source: "testInstVars\x0a\x09| o |\x0a\x09o := ObjectMock new.\x0a\x09self assert: (o instVarAt: #foo) equals: nil.\x0a\x0a\x09o instVarAt: #foo put: 1.\x0a\x09self assert: (o instVarAt: #foo) equals: 1.\x0a\x09self assert: (o instVarAt: 'foo') equals: 1",
2737
3250
  messageSends: ["new", "assert:equals:", "instVarAt:", "instVarAt:put:"],
@@ -2746,14 +3259,11 @@ selector: "testNilUndefined",
2746
3259
  category: 'tests',
2747
3260
  fn: function (){
2748
3261
  var self=this;
2749
- var notDefined;
2750
- notDefined = undefined;
2751
- ;
2752
- smalltalk.send(self,"_assert_",[smalltalk.send(nil,"__eq",[notDefined])]);
2753
- return self},
3262
+ return smalltalk.withContext(function($ctx1) {
3263
+ return self}, function($ctx1) {$ctx1.fill(self,"testNilUndefined",{}, smalltalk.ObjectTest)})},
2754
3264
  args: [],
2755
- source: "testNilUndefined\x0a\x09\x22nil in Smalltalk is the undefined object in JS\x22\x0a\x0a\x09| notDefined |\x0a \x0a <notDefined = undefined>.\x0a\x0a\x09self assert: nil = notDefined",
2756
- messageSends: ["assert:", "="],
3265
+ source: "testNilUndefined\x0a\x09\x22nil in Smalltalk is the undefined object in JS\x22\x0a\x0a\x09self assert: nil = self notDefined",
3266
+ messageSends: ["assert:", "=", "notDefined"],
2757
3267
  referencedClasses: []
2758
3268
  }),
2759
3269
  smalltalk.ObjectTest);
@@ -2763,13 +3273,12 @@ smalltalk.addMethod(
2763
3273
  smalltalk.method({
2764
3274
  selector: "testYourself",
2765
3275
  category: 'tests',
2766
- fn: function () {
2767
- var self = this;
2768
- var o;
2769
- o = smalltalk.send(smalltalk.ObjectMock || ObjectMock, "_new", []);
2770
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o, "_yourself", []), "__eq_eq", [o])]);
2771
- return self;
2772
- },
3276
+ fn: function (){
3277
+ var self=this;
3278
+ var o;
3279
+ return smalltalk.withContext(function($ctx1) {
3280
+ _st(self)._assert_(_st(_st(o)._yourself()).__eq_eq(o));
3281
+ return self}, function($ctx1) {$ctx1.fill(self,"testYourself",{o:o}, smalltalk.ObjectTest)})},
2773
3282
  args: [],
2774
3283
  source: "testYourself\x0a\x09| o |\x0a\x09o := ObjectMock new.\x0a\x09self assert: o yourself == o",
2775
3284
  messageSends: ["new", "assert:", "==", "yourself"],
@@ -2782,16 +3291,14 @@ smalltalk.addMethod(
2782
3291
  smalltalk.method({
2783
3292
  selector: "testidentityHash",
2784
3293
  category: 'tests',
2785
- fn: function () {
2786
- var self = this;
2787
- var o1;
2788
- var o2;
2789
- o1 = smalltalk.send(smalltalk.Object || Object, "_new", []);
2790
- o2 = smalltalk.send(smalltalk.Object || Object, "_new", []);
2791
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o1, "_identityHash", []), "__eq_eq", [smalltalk.send(o1, "_identityHash", [])])]);
2792
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(o1, "_identityHash", []), "__eq_eq", [smalltalk.send(o2, "_identityHash", [])])]);
2793
- return self;
2794
- },
3294
+ fn: function (){
3295
+ var self=this;
3296
+ var o1,o2;
3297
+ return smalltalk.withContext(function($ctx1) {
3298
+ o2=_st((smalltalk.Object || Object))._new();
3299
+ _st(self)._assert_(_st(_st(o1)._identityHash()).__eq_eq(_st(o1)._identityHash()));
3300
+ _st(self)._deny_(_st(_st(o1)._identityHash()).__eq_eq(_st(o2)._identityHash()));
3301
+ return self}, function($ctx1) {$ctx1.fill(self,"testidentityHash",{o1:o1,o2:o2}, smalltalk.ObjectTest)})},
2795
3302
  args: [],
2796
3303
  source: "testidentityHash\x0a\x09| o1 o2 |\x0a\x09\x0a\x09o1 := Object new.\x0a\x09o2 := Object new.\x0a\x0a\x09self assert: o1 identityHash == o1 identityHash.\x0a\x09self deny: o1 identityHash == o2 identityHash",
2797
3304
  messageSends: ["new", "assert:", "==", "identityHash", "deny:"],
@@ -2809,18 +3316,18 @@ selector: "setUp",
2809
3316
  category: 'running',
2810
3317
  fn: function (){
2811
3318
  var self=this;
2812
- var $1,$2;
2813
- self["@backUpCommitPathJs"]=smalltalk.send((smalltalk.Package || Package),"_defaultCommitPathJs",[]);
2814
- self["@backUpCommitPathSt"]=smalltalk.send((smalltalk.Package || Package),"_defaultCommitPathSt",[]);
2815
- smalltalk.send((smalltalk.Package || Package),"_resetCommitPaths",[]);
2816
- self["@zorkPackage"]=smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_new",[]),"_name_",["Zork"]);
2817
- $1=smalltalk.send((smalltalk.Package || Package),"_new",[]);
2818
- smalltalk.send($1,"_name_",["Grul"]);
2819
- smalltalk.send($1,"_commitPathJs_",["server/grul/js"]);
2820
- smalltalk.send($1,"_commitPathSt_",["grul/st"]);
2821
- $2=smalltalk.send($1,"_yourself",[]);
3319
+ return smalltalk.withContext(function($ctx1) {
3320
+ self["@backUpCommitPathJs"]=_st((smalltalk.Package || Package))._defaultCommitPathJs();
3321
+ self["@backUpCommitPathSt"]=_st((smalltalk.Package || Package))._defaultCommitPathSt();
3322
+ _st((smalltalk.Package || Package))._resetCommitPaths();
3323
+ self["@zorkPackage"]=_st(_st((smalltalk.Package || Package))._new())._name_("Zork");
3324
+ $1=_st((smalltalk.Package || Package))._new();
3325
+ _st($1)._name_("Grul");
3326
+ _st($1)._commitPathJs_("server/grul/js");
3327
+ _st($1)._commitPathSt_("grul/st");
3328
+ $2=_st($1)._yourself();
2822
3329
  self["@grulPackage"]=$2;
2823
- return self},
3330
+ return self}, function($ctx1) {$ctx1.fill(self,"setUp",{}, smalltalk.PackageTest)})},
2824
3331
  args: [],
2825
3332
  source: "setUp\x0a\x09backUpCommitPathJs := Package defaultCommitPathJs.\x0a\x09backUpCommitPathSt := Package defaultCommitPathSt.\x0a\x0a\x09Package resetCommitPaths.\x0a\x0a\x09zorkPackage := Package new name: 'Zork'.\x0a\x09grulPackage := Package new \x0a\x09\x09\x09\x09\x09name: 'Grul';\x0a\x09\x09\x09\x09\x09commitPathJs: 'server/grul/js';\x0a\x09\x09\x09\x09\x09commitPathSt: 'grul/st';\x0a\x09\x09\x09\x09\x09yourself",
2826
3333
  messageSends: ["defaultCommitPathJs", "defaultCommitPathSt", "resetCommitPaths", "name:", "new", "commitPathJs:", "commitPathSt:", "yourself"],
@@ -2835,10 +3342,11 @@ selector: "tearDown",
2835
3342
  category: 'running',
2836
3343
  fn: function (){
2837
3344
  var self=this;
2838
- var $1;
2839
- smalltalk.send((smalltalk.Package || Package),"_defaultCommitPathJs_",[self["@backUpCommitPathJs"]]);
2840
- $1=smalltalk.send((smalltalk.Package || Package),"_defaultCommitPathSt_",[self["@backUpCommitPathSt"]]);
2841
- return self},
3345
+ return smalltalk.withContext(function($ctx1) {
3346
+ $1=(smalltalk.Package || Package);
3347
+ _st($1)._defaultCommitPathJs_(self["@backUpCommitPathJs"]);
3348
+ $2=_st($1)._defaultCommitPathSt_(self["@backUpCommitPathSt"]);
3349
+ return self}, function($ctx1) {$ctx1.fill(self,"tearDown",{}, smalltalk.PackageTest)})},
2842
3350
  args: [],
2843
3351
  source: "tearDown\x0a\x09 Package \x0a\x09\x09defaultCommitPathJs: backUpCommitPathJs;\x0a\x09\x09defaultCommitPathSt: backUpCommitPathSt",
2844
3352
  messageSends: ["defaultCommitPathJs:", "defaultCommitPathSt:"],
@@ -2853,8 +3361,8 @@ selector: "testGrulCommitPathJsShouldBeServerGrulJs",
2853
3361
  category: 'tests',
2854
3362
  fn: function (){
2855
3363
  var self=this;
2856
- smalltalk.send(self,"_assert_equals_",["server/grul/js",smalltalk.send(self["@grulPackage"],"_commitPathJs",[])]);
2857
- return self},
3364
+ return smalltalk.withContext(function($ctx1) {
3365
+ return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathJsShouldBeServerGrulJs",{}, smalltalk.PackageTest)})},
2858
3366
  args: [],
2859
3367
  source: "testGrulCommitPathJsShouldBeServerGrulJs\x0a\x09self assert: 'server/grul/js' equals: grulPackage commitPathJs",
2860
3368
  messageSends: ["assert:equals:", "commitPathJs"],
@@ -2869,8 +3377,8 @@ selector: "testGrulCommitPathStShouldBeGrulSt",
2869
3377
  category: 'tests',
2870
3378
  fn: function (){
2871
3379
  var self=this;
2872
- smalltalk.send(self,"_assert_equals_",["grul/st",smalltalk.send(self["@grulPackage"],"_commitPathSt",[])]);
2873
- return self},
3380
+ return smalltalk.withContext(function($ctx1) {
3381
+ return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathStShouldBeGrulSt",{}, smalltalk.PackageTest)})},
2874
3382
  args: [],
2875
3383
  source: "testGrulCommitPathStShouldBeGrulSt\x0a\x09self assert: 'grul/st' equals: grulPackage commitPathSt",
2876
3384
  messageSends: ["assert:equals:", "commitPathSt"],
@@ -2885,8 +3393,8 @@ selector: "testZorkCommitPathJsShouldBeJs",
2885
3393
  category: 'tests',
2886
3394
  fn: function (){
2887
3395
  var self=this;
2888
- smalltalk.send(self,"_assert_equals_",["js",smalltalk.send(self["@zorkPackage"],"_commitPathJs",[])]);
2889
- return self},
3396
+ return smalltalk.withContext(function($ctx1) {
3397
+ return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathJsShouldBeJs",{}, smalltalk.PackageTest)})},
2890
3398
  args: [],
2891
3399
  source: "testZorkCommitPathJsShouldBeJs\x0a\x09self assert: 'js' equals: zorkPackage commitPathJs",
2892
3400
  messageSends: ["assert:equals:", "commitPathJs"],
@@ -2901,8 +3409,8 @@ selector: "testZorkCommitPathStShouldBeSt",
2901
3409
  category: 'tests',
2902
3410
  fn: function (){
2903
3411
  var self=this;
2904
- smalltalk.send(self,"_assert_equals_",["st",smalltalk.send(self["@zorkPackage"],"_commitPathSt",[])]);
2905
- return self},
3412
+ return smalltalk.withContext(function($ctx1) {
3413
+ return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathStShouldBeSt",{}, smalltalk.PackageTest)})},
2906
3414
  args: [],
2907
3415
  source: "testZorkCommitPathStShouldBeSt\x0a\x09self assert: 'st' equals: zorkPackage commitPathSt",
2908
3416
  messageSends: ["assert:equals:", "commitPathSt"],
@@ -2920,11 +3428,12 @@ selector: "setUp",
2920
3428
  category: 'running',
2921
3429
  fn: function (){
2922
3430
  var self=this;
2923
- var $1;
2924
- smalltalk.send(self,"_setUp",[],smalltalk.PackageTest);
2925
- smalltalk.send((smalltalk.Package || Package),"_defaultCommitPathJs_",["javascripts/"]);
2926
- $1=smalltalk.send((smalltalk.Package || Package),"_defaultCommitPathSt_",["smalltalk/"]);
2927
- return self},
3431
+ return smalltalk.withContext(function($ctx1) {
3432
+ smalltalk.PackageTest.fn.prototype._setUp.apply(_st(self), []);
3433
+ $1=(smalltalk.Package || Package);
3434
+ _st($1)._defaultCommitPathJs_("javascripts/");
3435
+ $2=_st($1)._defaultCommitPathSt_("smalltalk/");
3436
+ return self}, function($ctx1) {$ctx1.fill(self,"setUp",{}, smalltalk.PackageWithDefaultCommitPathChangedTest)})},
2928
3437
  args: [],
2929
3438
  source: "setUp\x0a\x09super setUp.\x0a\x0a\x09Package\x0a\x09\x09defaultCommitPathJs: 'javascripts/';\x0a\x09\x09defaultCommitPathSt: 'smalltalk/'.",
2930
3439
  messageSends: ["setUp", "defaultCommitPathJs:", "defaultCommitPathSt:"],
@@ -2939,8 +3448,8 @@ selector: "testGrulCommitPathJsShouldBeServerGrulJs",
2939
3448
  category: 'tests',
2940
3449
  fn: function (){
2941
3450
  var self=this;
2942
- smalltalk.send(self,"_assert_equals_",["server/grul/js",smalltalk.send(self["@grulPackage"],"_commitPathJs",[])]);
2943
- return self},
3451
+ return smalltalk.withContext(function($ctx1) {
3452
+ return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathJsShouldBeServerGrulJs",{}, smalltalk.PackageWithDefaultCommitPathChangedTest)})},
2944
3453
  args: [],
2945
3454
  source: "testGrulCommitPathJsShouldBeServerGrulJs\x0a\x09self assert: 'server/grul/js' equals: grulPackage commitPathJs",
2946
3455
  messageSends: ["assert:equals:", "commitPathJs"],
@@ -2955,8 +3464,8 @@ selector: "testGrulCommitPathStShouldBeGrulSt",
2955
3464
  category: 'tests',
2956
3465
  fn: function (){
2957
3466
  var self=this;
2958
- smalltalk.send(self,"_assert_equals_",["grul/st",smalltalk.send(self["@grulPackage"],"_commitPathSt",[])]);
2959
- return self},
3467
+ return smalltalk.withContext(function($ctx1) {
3468
+ return self}, function($ctx1) {$ctx1.fill(self,"testGrulCommitPathStShouldBeGrulSt",{}, smalltalk.PackageWithDefaultCommitPathChangedTest)})},
2960
3469
  args: [],
2961
3470
  source: "testGrulCommitPathStShouldBeGrulSt\x0a\x09self assert: 'grul/st' equals: grulPackage commitPathSt",
2962
3471
  messageSends: ["assert:equals:", "commitPathSt"],
@@ -2971,8 +3480,8 @@ selector: "testZorkCommitPathJsShouldBeJavascript",
2971
3480
  category: 'tests',
2972
3481
  fn: function (){
2973
3482
  var self=this;
2974
- smalltalk.send(self,"_assert_equals_",["javascripts/",smalltalk.send(self["@zorkPackage"],"_commitPathJs",[])]);
2975
- return self},
3483
+ return smalltalk.withContext(function($ctx1) {
3484
+ return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathJsShouldBeJavascript",{}, smalltalk.PackageWithDefaultCommitPathChangedTest)})},
2976
3485
  args: [],
2977
3486
  source: "testZorkCommitPathJsShouldBeJavascript\x0a\x09self assert: 'javascripts/' equals: zorkPackage commitPathJs",
2978
3487
  messageSends: ["assert:equals:", "commitPathJs"],
@@ -2987,8 +3496,8 @@ selector: "testZorkCommitPathStShouldBeSmalltalk",
2987
3496
  category: 'tests',
2988
3497
  fn: function (){
2989
3498
  var self=this;
2990
- smalltalk.send(self,"_assert_equals_",["smalltalk/",smalltalk.send(self["@zorkPackage"],"_commitPathSt",[])]);
2991
- return self},
3499
+ return smalltalk.withContext(function($ctx1) {
3500
+ return self}, function($ctx1) {$ctx1.fill(self,"testZorkCommitPathStShouldBeSmalltalk",{}, smalltalk.PackageWithDefaultCommitPathChangedTest)})},
2992
3501
  args: [],
2993
3502
  source: "testZorkCommitPathStShouldBeSmalltalk\x0a\x09self assert: 'smalltalk/' equals: zorkPackage commitPathSt",
2994
3503
  messageSends: ["assert:equals:", "commitPathSt"],
@@ -3004,8 +3513,8 @@ selector: "shouldInheritSelectors",
3004
3513
  category: 'accessing',
3005
3514
  fn: function (){
3006
3515
  var self=this;
3007
- return false;
3008
- },
3516
+ return smalltalk.withContext(function($ctx1) {
3517
+ }, function($ctx1) {$ctx1.fill(self,"shouldInheritSelectors",{}, smalltalk.PackageWithDefaultCommitPathChangedTest.klass)})},
3009
3518
  args: [],
3010
3519
  source: "shouldInheritSelectors\x0a\x09^ false",
3011
3520
  messageSends: [],
@@ -3022,11 +3531,11 @@ selector: "testAccessing",
3022
3531
  category: 'tests',
3023
3532
  fn: function (){
3024
3533
  var self=this;
3025
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((smalltalk.Point || Point),"_x_y_",[(3),(4)]),"_x",[]),(3)]);
3026
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((smalltalk.Point || Point),"_x_y_",[(3),(4)]),"_y",[]),(4)]);
3027
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Point || Point),"_new",[]),"_x_",[(3)]),"_x",[]),(3)]);
3028
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Point || Point),"_new",[]),"_y_",[(4)]),"_y",[]),(4)]);
3029
- return self},
3534
+ return smalltalk.withContext(function($ctx1) {
3535
+ _st(self)._assert_equals_(_st(_st((smalltalk.Point || Point))._x_y_((3),(4)))._y(),(4));
3536
+ _st(self)._assert_equals_(_st(_st(_st((smalltalk.Point || Point))._new())._x_((3)))._x(),(3));
3537
+ _st(self)._assert_equals_(_st(_st(_st((smalltalk.Point || Point))._new())._y_((4)))._y(),(4));
3538
+ return self}, function($ctx1) {$ctx1.fill(self,"testAccessing",{}, smalltalk.PointTest)})},
3030
3539
  args: [],
3031
3540
  source: "testAccessing\x0a\x09self assert: (Point x: 3 y: 4) x equals: 3.\x0a\x09self assert: (Point x: 3 y: 4) y equals: 4.\x0a\x09self assert: (Point new x: 3) x equals: 3.\x0a\x09self assert: (Point new y: 4) y equals: 4",
3032
3541
  messageSends: ["assert:equals:", "x", "x:y:", "y", "x:", "new", "y:"],
@@ -3041,11 +3550,11 @@ selector: "testArithmetic",
3041
3550
  category: 'tests',
3042
3551
  fn: function (){
3043
3552
  var self=this;
3044
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((3),"__at",[(4)]),"__star",[smalltalk.send((3),"__at",[(4)])]),smalltalk.send((smalltalk.Point || Point),"_x_y_",[(9),(16)])]);
3045
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((3),"__at",[(4)]),"__plus",[smalltalk.send((3),"__at",[(4)])]),smalltalk.send((smalltalk.Point || Point),"_x_y_",[(6),(8)])]);
3046
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((3),"__at",[(4)]),"__minus",[smalltalk.send((3),"__at",[(4)])]),smalltalk.send((smalltalk.Point || Point),"_x_y_",[(0),(0)])]);
3047
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((6),"__at",[(8)]),"__slash",[smalltalk.send((3),"__at",[(4)])]),smalltalk.send((smalltalk.Point || Point),"_x_y_",[(2),(2)])]);
3048
- return self},
3553
+ return smalltalk.withContext(function($ctx1) {
3554
+ _st(self)._assert_equals_(_st(_st((3)).__at((4))).__plus(_st((3)).__at((4))),_st((smalltalk.Point || Point))._x_y_((6),(8)));
3555
+ _st(self)._assert_equals_(_st(_st((3)).__at((4))).__minus(_st((3)).__at((4))),_st((smalltalk.Point || Point))._x_y_((0),(0)));
3556
+ _st(self)._assert_equals_(_st(_st((6)).__at((8))).__slash(_st((3)).__at((4))),_st((smalltalk.Point || Point))._x_y_((2),(2)));
3557
+ return self}, function($ctx1) {$ctx1.fill(self,"testArithmetic",{}, smalltalk.PointTest)})},
3049
3558
  args: [],
3050
3559
  source: "testArithmetic\x0a\x09self assert: 3@4 * (3@4 ) equals: (Point x: 9 y: 16).\x0a\x09self assert: 3@4 + (3@4 ) equals: (Point x: 6 y: 8).\x0a\x09self assert: 3@4 - (3@4 ) equals: (Point x: 0 y: 0).\x0a\x09self assert: 6@8 / (3@4 ) equals: (Point x: 2 y: 2)",
3051
3560
  messageSends: ["assert:equals:", "*", "@", "x:y:", "+", "-", "/"],
@@ -3060,8 +3569,8 @@ selector: "testAt",
3060
3569
  category: 'tests',
3061
3570
  fn: function (){
3062
3571
  var self=this;
3063
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((3),"__at",[(4)]),smalltalk.send((smalltalk.Point || Point),"_x_y_",[(3),(4)])]);
3064
- return self},
3572
+ return smalltalk.withContext(function($ctx1) {
3573
+ return self}, function($ctx1) {$ctx1.fill(self,"testAt",{}, smalltalk.PointTest)})},
3065
3574
  args: [],
3066
3575
  source: "testAt\x0a\x09self assert: 3@4 equals: (Point x: 3 y: 4)",
3067
3576
  messageSends: ["assert:equals:", "@", "x:y:"],
@@ -3076,9 +3585,9 @@ selector: "testEgality",
3076
3585
  category: 'tests',
3077
3586
  fn: function (){
3078
3587
  var self=this;
3079
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send((3),"__at",[(4)]),"__eq",[smalltalk.send((3),"__at",[(4)])])]);
3080
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send((3),"__at",[(5)]),"__eq",[smalltalk.send((3),"__at",[(6)])])]);
3081
- return self},
3588
+ return smalltalk.withContext(function($ctx1) {
3589
+ _st(self)._deny_(_st(_st((3)).__at((5))).__eq(_st((3)).__at((6))));
3590
+ return self}, function($ctx1) {$ctx1.fill(self,"testEgality",{}, smalltalk.PointTest)})},
3082
3591
  args: [],
3083
3592
  source: "testEgality\x0a\x09self assert: 3@4 = (3@4).\x0a\x09self deny: 3@5 = (3@6)",
3084
3593
  messageSends: ["assert:", "=", "@", "deny:"],
@@ -3093,11 +3602,11 @@ selector: "testTranslateBy",
3093
3602
  category: 'tests',
3094
3603
  fn: function (){
3095
3604
  var self=this;
3096
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((3),"__at",[(4)]),smalltalk.send(smalltalk.send((3),"__at",[(3)]),"_translateBy_",[smalltalk.send((0),"__at",[(1)])])]);
3097
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((3),"__at",[(2)]),smalltalk.send(smalltalk.send((3),"__at",[(3)]),"_translateBy_",[smalltalk.send((0),"__at",[smalltalk.send((1),"_negated",[])])])]);
3098
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((5),"__at",[(6)]),smalltalk.send(smalltalk.send((3),"__at",[(3)]),"_translateBy_",[smalltalk.send((2),"__at",[(3)])])]);
3099
- smalltalk.send(self,"_assert_equals_",[smalltalk.send((0),"__at",[(3)]),smalltalk.send(smalltalk.send((3),"__at",[(3)]),"_translateBy_",[smalltalk.send(smalltalk.send((3),"_negated",[]),"__at",[(0)])])]);
3100
- return self},
3605
+ return smalltalk.withContext(function($ctx1) {
3606
+ _st(self)._assert_equals_(_st((3)).__at((2)),_st(_st((3)).__at((3)))._translateBy_(_st((0)).__at(_st((1))._negated())));
3607
+ _st(self)._assert_equals_(_st((5)).__at((6)),_st(_st((3)).__at((3)))._translateBy_(_st((2)).__at((3))));
3608
+ _st(self)._assert_equals_(_st((0)).__at((3)),_st(_st((3)).__at((3)))._translateBy_(_st(_st((3))._negated()).__at((0))));
3609
+ return self}, function($ctx1) {$ctx1.fill(self,"testTranslateBy",{}, smalltalk.PointTest)})},
3101
3610
  args: [],
3102
3611
  source: "testTranslateBy\x0a\x09self assert: 3@4 equals: (3@3 translateBy: 0@1).\x0a\x09self assert: 3@2 equals: (3@3 translateBy: 0@1 negated).\x0a\x09self assert: 5@6 equals: (3@3 translateBy: 2@3).\x0a\x09self assert: 0@3 equals: (3@3 translateBy: 3 negated @0).",
3103
3612
  messageSends: ["assert:equals:", "@", "translateBy:", "negated"],
@@ -3115,17 +3624,16 @@ selector: "textNext",
3115
3624
  category: 'tests',
3116
3625
  fn: function (){
3117
3626
  var self=this;
3118
- smalltalk.send((10000),"_timesRepeat_",[(function(){
3119
- var current;
3120
- var next;
3121
- next=smalltalk.send(smalltalk.send((smalltalk.Random || Random),"_new",[]),"_next",[]);
3627
+ return smalltalk.withContext(function($ctx1) {
3628
+ var current,next;
3629
+ return smalltalk.withContext(function($ctx2) {
3122
3630
  next;
3123
- smalltalk.send(self,"_assert_",[smalltalk.send(next,"__gt_eq",[(0)])]);
3124
- smalltalk.send(self,"_assert_",[smalltalk.send(next,"__lt",[(1)])]);
3125
- smalltalk.send(self,"_deny_",[smalltalk.send(current,"__eq",[next])]);
3126
- return smalltalk.send(next,"__eq",[current]);
3127
- })]);
3128
- return self},
3631
+ _st(self)._assert_(_st(next).__gt_eq((0)));
3632
+ _st(self)._assert_(_st(next).__lt((1)));
3633
+ _st(self)._deny_(_st(current).__eq(next));
3634
+ return _st(next).__eq(current);
3635
+ }, function($ctx2) {$ctx2.fillBlock({current:current,next:next},$ctx1)})}));
3636
+ return self}, function($ctx1) {$ctx1.fill(self,"textNext",{}, smalltalk.RandomTest)})},
3129
3637
  args: [],
3130
3638
  source: "textNext\x0a\x0a\x0910000 timesRepeat: [\x0a\x09\x09\x09| current next | \x0a\x09\x09\x09next := Random new next.\x0a\x09\x09\x09self assert: (next >= 0).\x0a\x09\x09\x09self assert: (next < 1).\x0a\x09\x09\x09self deny: current = next.\x0a\x09\x09\x09next = current]",
3131
3639
  messageSends: ["timesRepeat:", "next", "new", "assert:", ">=", "<", "deny:", "="],
@@ -3144,15 +3652,15 @@ category: 'tests',
3144
3652
  fn: function (){
3145
3653
  var self=this;
3146
3654
  var set;
3147
- set=smalltalk.send((smalltalk.Set || Set),"_new",[]);
3148
- smalltalk.send(self,"_assert_",[smalltalk.send(set,"_isEmpty",[])]);
3149
- smalltalk.send(set,"_add_",[(3)]);
3150
- smalltalk.send(self,"_assert_",[smalltalk.send(set,"_includes_",[(3)])]);
3151
- smalltalk.send(set,"_add_",[(5)]);
3152
- smalltalk.send(self,"_assert_",[smalltalk.send(set,"_includes_",[(5)])]);
3153
- smalltalk.send(set,"_remove_",[(3)]);
3154
- smalltalk.send(self,"_deny_",[smalltalk.send(set,"_includes_",[(3)])]);
3155
- return self},
3655
+ return smalltalk.withContext(function($ctx1) {
3656
+ _st(self)._assert_(_st(set)._isEmpty());
3657
+ _st(set)._add_((3));
3658
+ _st(self)._assert_(_st(set)._includes_((3)));
3659
+ _st(set)._add_((5));
3660
+ _st(self)._assert_(_st(set)._includes_((5)));
3661
+ _st(set)._remove_((3));
3662
+ _st(self)._deny_(_st(set)._includes_((3)));
3663
+ return self}, function($ctx1) {$ctx1.fill(self,"testAddRemove",{set:set}, smalltalk.SetTest)})},
3156
3664
  args: [],
3157
3665
  source: "testAddRemove\x0a\x09| set |\x0a\x09set := Set new.\x0a\x09\x0a\x09self assert: set isEmpty.\x0a\x0a\x09set add: 3.\x0a\x09self assert: (set includes: 3).\x0a\x0a\x09set add: 5.\x0a\x09self assert: (set includes: 5).\x0a\x0a\x09set remove: 3.\x0a\x09self deny: (set includes: 3)",
3158
3666
  messageSends: ["new", "assert:", "isEmpty", "add:", "includes:", "remove:", "deny:"],
@@ -3167,10 +3675,10 @@ selector: "testAt",
3167
3675
  category: 'tests',
3168
3676
  fn: function (){
3169
3677
  var self=this;
3170
- smalltalk.send(self,"_should_raise_",[(function(){
3171
- return smalltalk.send(smalltalk.send((smalltalk.Set || Set),"_new",[]),"_at_put_",[(1),(2)]);
3172
- }),(smalltalk.Error || Error)]);
3173
- return self},
3678
+ return smalltalk.withContext(function($ctx1) {
3679
+ return smalltalk.withContext(function($ctx2) {
3680
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(smalltalk.Error || Error));
3681
+ return self}, function($ctx1) {$ctx1.fill(self,"testAt",{}, smalltalk.SetTest)})},
3174
3682
  args: [],
3175
3683
  source: "testAt\x0a\x09self should: [Set new at: 1 put: 2] raise: Error",
3176
3684
  messageSends: ["should:raise:", "at:put:", "new"],
@@ -3185,23 +3693,25 @@ selector: "testPrintString",
3185
3693
  category: 'tests',
3186
3694
  fn: function (){
3187
3695
  var self=this;
3188
- var $1,$2;
3189
3696
  var set;
3190
- set=smalltalk.send((smalltalk.Set || Set),"_new",[]);
3191
- smalltalk.send(self,"_assert_equals_",["a Set ()",smalltalk.send(set,"_printString",[])]);
3192
- smalltalk.send(set,"_add_",[(1)]);
3193
- $1=smalltalk.send(set,"_add_",[(3)]);
3194
- smalltalk.send(self,"_assert_equals_",["a Set (1 3)",smalltalk.send(set,"_printString",[])]);
3195
- smalltalk.send(set,"_add_",["foo"]);
3196
- smalltalk.send(self,"_assert_equals_",["a Set (1 3 'foo')",smalltalk.send(set,"_printString",[])]);
3197
- smalltalk.send(set,"_remove_",[(1)]);
3198
- $2=smalltalk.send(set,"_remove_",[(3)]);
3199
- smalltalk.send(self,"_assert_equals_",["a Set ('foo')",smalltalk.send(set,"_printString",[])]);
3200
- smalltalk.send(set,"_add_",[(3)]);
3201
- smalltalk.send(self,"_assert_equals_",["a Set ('foo' 3)",smalltalk.send(set,"_printString",[])]);
3202
- smalltalk.send(set,"_add_",[(3)]);
3203
- smalltalk.send(self,"_assert_equals_",["a Set ('foo' 3)",smalltalk.send(set,"_printString",[])]);
3204
- return self},
3697
+ return smalltalk.withContext(function($ctx1) {
3698
+ set=_st((smalltalk.Set || Set))._new();
3699
+ _st(self)._assert_equals_("a Set ()",_st(set)._printString());
3700
+ $1=set;
3701
+ _st($1)._add_((1));
3702
+ $2=_st($1)._add_((3));
3703
+ _st(self)._assert_equals_("a Set (1 3)",_st(set)._printString());
3704
+ _st(set)._add_("foo");
3705
+ _st(self)._assert_equals_("a Set (1 3 'foo')",_st(set)._printString());
3706
+ $3=set;
3707
+ _st($3)._remove_((1));
3708
+ $4=_st($3)._remove_((3));
3709
+ _st(self)._assert_equals_("a Set ('foo')",_st(set)._printString());
3710
+ _st(set)._add_((3));
3711
+ _st(self)._assert_equals_("a Set ('foo' 3)",_st(set)._printString());
3712
+ _st(set)._add_((3));
3713
+ _st(self)._assert_equals_("a Set ('foo' 3)",_st(set)._printString());
3714
+ return self}, function($ctx1) {$ctx1.fill(self,"testPrintString",{set:set}, smalltalk.SetTest)})},
3205
3715
  args: [],
3206
3716
  source: "testPrintString\x0a\x09| set |\x0a\x09set := Set new.\x0a\x09self assert: 'a Set ()' equals: ( set printString ).\x0a\x09set add: 1; add: 3.\x0a\x09self assert: 'a Set (1 3)' equals: ( set printString ).\x0a\x09set add: 'foo'.\x0a\x09self assert: 'a Set (1 3 ''foo'')' equals: ( set printString ).\x0a\x09set remove: 1; remove: 3.\x0a\x09self assert: 'a Set (''foo'')' equals: ( set printString ).\x0a\x09set add: 3.\x0a\x09self assert: 'a Set (''foo'' 3)' equals: ( set printString ).\x0a\x09set add: 3.\x0a\x09self assert: 'a Set (''foo'' 3)' equals: ( set printString ).",
3207
3717
  messageSends: ["new", "assert:equals:", "printString", "add:", "remove:"],
@@ -3216,10 +3726,10 @@ selector: "testSize",
3216
3726
  category: 'tests',
3217
3727
  fn: function (){
3218
3728
  var self=this;
3219
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((smalltalk.Set || Set),"_new",[]),"_size",[]),(0)]);
3220
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((smalltalk.Set || Set),"_withAll_",[[(1), (2), (3), (4)]]),"_size",[]),(4)]);
3221
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(smalltalk.send((smalltalk.Set || Set),"_withAll_",[[(1), (1), (1), (1)]]),"_size",[]),(1)]);
3222
- return self},
3729
+ return smalltalk.withContext(function($ctx1) {
3730
+ _st(self)._assert_equals_(_st(_st((smalltalk.Set || Set))._withAll_([(1), (2), (3), (4)]))._size(),(4));
3731
+ _st(self)._assert_equals_(_st(_st((smalltalk.Set || Set))._withAll_([(1), (1), (1), (1)]))._size(),(1));
3732
+ return self}, function($ctx1) {$ctx1.fill(self,"testSize",{}, smalltalk.SetTest)})},
3223
3733
  args: [],
3224
3734
  source: "testSize\x0a\x09self assert: Set new size equals: 0.\x0a\x09self assert: (Set withAll: #(1 2 3 4)) size equals: 4.\x0a\x09self assert: (Set withAll: #(1 1 1 1)) size equals: 1",
3225
3735
  messageSends: ["assert:equals:", "size", "new", "withAll:"],
@@ -3235,15 +3745,15 @@ category: 'tests',
3235
3745
  fn: function (){
3236
3746
  var self=this;
3237
3747
  var set;
3238
- set=smalltalk.send((smalltalk.Set || Set),"_new",[]);
3239
- smalltalk.send(set,"_add_",[(21)]);
3240
- smalltalk.send(set,"_add_",["hello"]);
3241
- smalltalk.send(set,"_add_",[(21)]);
3242
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(set,"_size",[]),"__eq",[(2)])]);
3243
- smalltalk.send(set,"_add_",["hello"]);
3244
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(set,"_size",[]),"__eq",[(2)])]);
3245
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(set,"_asArray",[]),[(21), "hello"]]);
3246
- return self},
3748
+ return smalltalk.withContext(function($ctx1) {
3749
+ _st(set)._add_((21));
3750
+ _st(set)._add_("hello");
3751
+ _st(set)._add_((21));
3752
+ _st(self)._assert_(_st(_st(set)._size()).__eq((2)));
3753
+ _st(set)._add_("hello");
3754
+ _st(self)._assert_(_st(_st(set)._size()).__eq((2)));
3755
+ _st(self)._assert_equals_(_st(set)._asArray(),[(21), "hello"]);
3756
+ return self}, function($ctx1) {$ctx1.fill(self,"testUnicity",{set:set}, smalltalk.SetTest)})},
3247
3757
  args: [],
3248
3758
  source: "testUnicity\x0a\x09| set |\x0a\x09set := Set new.\x0a\x09set add: 21.\x0a\x09set add: 'hello'.\x0a\x0a\x09set add: 21.\x0a\x09self assert: set size = 2.\x0a\x09\x0a\x09set add: 'hello'.\x0a\x09self assert: set size = 2.\x0a\x0a\x09self assert: set asArray equals: #(21 'hello')",
3249
3759
  messageSends: ["new", "add:", "assert:", "=", "size", "assert:equals:", "asArray"],
@@ -3261,8 +3771,8 @@ selector: "testCopying",
3261
3771
  category: 'tests',
3262
3772
  fn: function (){
3263
3773
  var self=this;
3264
- smalltalk.send(self,"_assert_equals_",[smalltalk.send(nil,"_copy",[]),nil]);
3265
- return self},
3774
+ return smalltalk.withContext(function($ctx1) {
3775
+ return self}, function($ctx1) {$ctx1.fill(self,"testCopying",{}, smalltalk.UndefinedTest)})},
3266
3776
  args: [],
3267
3777
  source: "testCopying\x0a\x09self assert: nil copy equals: nil",
3268
3778
  messageSends: ["assert:equals:", "copy"],
@@ -3277,8 +3787,8 @@ selector: "testDeepCopy",
3277
3787
  category: 'tests',
3278
3788
  fn: function (){
3279
3789
  var self=this;
3280
- smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(nil,"_deepCopy",[]),"__eq",[nil])]);
3281
- return self},
3790
+ return smalltalk.withContext(function($ctx1) {
3791
+ return self}, function($ctx1) {$ctx1.fill(self,"testDeepCopy",{}, smalltalk.UndefinedTest)})},
3282
3792
  args: [],
3283
3793
  source: "testDeepCopy\x0a\x09self assert: nil deepCopy = nil",
3284
3794
  messageSends: ["assert:", "=", "deepCopy"],
@@ -3293,31 +3803,35 @@ selector: "testIfNil",
3293
3803
  category: 'tests',
3294
3804
  fn: function (){
3295
3805
  var self=this;
3296
- var $1,$2,$3;
3806
+ return smalltalk.withContext(function($ctx1) {
3807
+ $1=self;
3297
3808
  if(($receiver = nil) == nil || $receiver == undefined){
3298
- $1=true;
3809
+ $2=true;
3299
3810
  } else {
3300
- $1=nil;
3811
+ $2=nil;
3301
3812
  };
3302
- smalltalk.send(self,"_assert_equals_",[$1,true]);
3813
+ _st($1)._assert_equals_($2,true);
3814
+ $3=self;
3303
3815
  if(($receiver = nil) == nil || $receiver == undefined){
3304
- $2=nil;
3816
+ $5=nil;
3305
3817
  } else {
3306
- $2=true;
3818
+ $5=true;
3307
3819
  };
3308
- smalltalk.send(self,"_deny_",[smalltalk.send($2,"__eq",[true])]);
3820
+ $4=_st($5).__eq(true);
3821
+ _st($3)._deny_($4);
3822
+ $6=self;
3309
3823
  if(($receiver = nil) == nil || $receiver == undefined){
3310
- $3=true;
3824
+ $7=true;
3311
3825
  } else {
3312
- $3=false;
3826
+ $7=false;
3313
3827
  };
3314
- smalltalk.send(self,"_assert_equals_",[$3,true]);
3315
- smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(nil,"_ifNotNil_ifNil_",[(function(){
3316
- return true;
3317
- }),(function(){
3318
- return false;
3319
- })]),"__eq",[true])]);
3320
- return self},
3828
+ _st($6)._assert_equals_($7,true);
3829
+ _st(self)._deny_(_st(_st(nil)._ifNotNil_ifNil_((function(){
3830
+ return smalltalk.withContext(function($ctx2) {
3831
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(){
3832
+ return smalltalk.withContext(function($ctx2) {
3833
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))).__eq(true));
3834
+ return self}, function($ctx1) {$ctx1.fill(self,"testIfNil",{}, smalltalk.UndefinedTest)})},
3321
3835
  args: [],
3322
3836
  source: "testIfNil\x0a\x09self assert: (nil ifNil: [true]) equals: true.\x0a\x09self deny: (nil ifNotNil: [true]) = true.\x0a\x09self assert: (nil ifNil: [true] ifNotNil: [false]) equals: true.\x0a\x09self deny: (nil ifNotNil: [true] ifNil: [false]) = true",
3323
3837
  messageSends: ["assert:equals:", "ifNil:", "deny:", "=", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"],
@@ -3332,9 +3846,9 @@ selector: "testIsNil",
3332
3846
  category: 'tests',
3333
3847
  fn: function (){
3334
3848
  var self=this;
3335
- smalltalk.send(self,"_assert_",[smalltalk.send(nil,"_isNil",[])]);
3336
- smalltalk.send(self,"_deny_",[smalltalk.send(nil,"_notNil",[])]);
3337
- return self},
3849
+ return smalltalk.withContext(function($ctx1) {
3850
+ _st(self)._deny_(_st(nil)._notNil());
3851
+ return self}, function($ctx1) {$ctx1.fill(self,"testIsNil",{}, smalltalk.UndefinedTest)})},
3338
3852
  args: [],
3339
3853
  source: "testIsNil\x0a\x09self assert: nil isNil.\x0a\x09self deny: nil notNil.",
3340
3854
  messageSends: ["assert:", "isNil", "deny:", "notNil"],