resin 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/README.markdown +2 -0
  2. data/amber/bin/nodecompile.js +3 -3
  3. data/amber/css/amber.css +47 -23
  4. data/amber/images/off.amber.png +0 -0
  5. data/amber/images/offHover.amber.png +0 -0
  6. data/amber/images/sprite.amber.png +0 -0
  7. data/amber/images/tinylogo.amber.png +0 -0
  8. data/amber/js/Benchfib.deploy.js +34 -34
  9. data/amber/js/Benchfib.js +49 -49
  10. data/amber/js/Canvas.deploy.js +937 -937
  11. data/amber/js/Canvas.js +1622 -1622
  12. data/amber/js/Compiler-Tests.deploy.js +97 -0
  13. data/amber/js/Compiler-Tests.js +137 -0
  14. data/amber/js/Compiler.deploy.js +1030 -924
  15. data/amber/js/Compiler.js +1613 -1467
  16. data/amber/js/Documentation.deploy.js +417 -417
  17. data/amber/js/Documentation.js +728 -728
  18. data/amber/js/Examples.deploy.js +24 -13
  19. data/amber/js/Examples.js +36 -19
  20. data/amber/js/IDE.deploy.js +1583 -1527
  21. data/amber/js/IDE.js +2586 -2510
  22. data/amber/js/Kernel-Announcements.deploy.js +19 -19
  23. data/amber/js/Kernel-Announcements.js +28 -28
  24. data/amber/js/Kernel-Classes.deploy.js +332 -229
  25. data/amber/js/Kernel-Classes.js +532 -384
  26. data/amber/js/Kernel-Collections.deploy.js +1516 -1712
  27. data/amber/js/Kernel-Collections.js +2436 -2712
  28. data/amber/js/Kernel-Exceptions.deploy.js +85 -62
  29. data/amber/js/Kernel-Exceptions.js +131 -98
  30. data/amber/js/Kernel-Methods.deploy.js +326 -378
  31. data/amber/js/Kernel-Methods.js +473 -525
  32. data/amber/js/Kernel-Objects.deploy.js +1777 -2428
  33. data/amber/js/Kernel-Objects.js +2599 -3426
  34. data/amber/js/Kernel-Tests.deploy.js +871 -772
  35. data/amber/js/Kernel-Tests.js +1207 -1083
  36. data/amber/js/Kernel-Transcript.deploy.js +57 -57
  37. data/amber/js/Kernel-Transcript.js +94 -94
  38. data/amber/js/SUnit.deploy.js +116 -116
  39. data/amber/js/SUnit.js +211 -211
  40. data/amber/js/amber.js +10 -11
  41. data/amber/js/boot.js +132 -156
  42. data/amber/js/init.js +2 -2
  43. data/amber/js/parser.js +2095 -3014
  44. data/amber/js/parser.pegjs +1 -1
  45. data/amber/st/Benchfib.st +22 -22
  46. data/amber/st/Canvas.st +471 -471
  47. data/amber/st/Compiler-Tests.st +471 -0
  48. data/amber/st/Compiler.st +858 -794
  49. data/amber/st/Examples.st +22 -5
  50. data/amber/st/IDE.st +1326 -1291
  51. data/amber/st/Kernel-Announcements.st +2 -2
  52. data/amber/st/Kernel-Classes.st +148 -90
  53. data/amber/st/Kernel-Collections.st +950 -1061
  54. data/amber/st/Kernel-Exceptions.st +33 -25
  55. data/amber/st/Kernel-Methods.st +151 -151
  56. data/amber/st/Kernel-Objects.st +891 -1036
  57. data/amber/st/Kernel-Tests.st +622 -544
  58. data/amber/st/Kernel-Transcript.st +38 -38
  59. data/amber/st/SUnit.st +53 -53
  60. metadata +27 -20
@@ -1,89 +1,89 @@
1
1
  smalltalk.addPackage('SUnit', {});
2
2
  smalltalk.addClass('TestCase', smalltalk.Object, ['testSelector'], 'SUnit');
3
3
  smalltalk.addMethod(
4
- unescape('_setTestSelector_'),
4
+ "_assert_",
5
5
  smalltalk.method({
6
- selector: unescape('setTestSelector%3A'),
7
- category: 'accessing',
8
- fn: function (aSelector){
6
+ selector: "assert:",
7
+ category: 'testing',
8
+ fn: function (aBoolean){
9
9
  var self=this;
10
- (self['@testSelector']=aSelector);
10
+ smalltalk.send(self, "_assert_description_", [aBoolean, "Assertion failed"]);
11
11
  return self;},
12
- args: ["aSelector"],
13
- source: unescape('setTestSelector%3A%20aSelector%0A%09testSelector%20%3A%3D%20aSelector'),
14
- messageSends: [],
12
+ args: ["aBoolean"],
13
+ source: "assert: aBoolean\x0a\x09self assert: aBoolean description: 'Assertion failed'",
14
+ messageSends: ["assert:description:"],
15
15
  referencedClasses: []
16
16
  }),
17
17
  smalltalk.TestCase);
18
18
 
19
19
  smalltalk.addMethod(
20
- unescape('_selector'),
20
+ "_assert_description_",
21
21
  smalltalk.method({
22
- selector: unescape('selector'),
23
- category: 'accessing',
24
- fn: function (){
22
+ selector: "assert:description:",
23
+ category: 'testing',
24
+ fn: function (aBoolean, aString){
25
25
  var self=this;
26
- return self['@testSelector'];
26
+ ((($receiver = aBoolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_signalFailure_", [aString]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_signalFailure_", [aString]);})]));
27
27
  return self;},
28
- args: [],
29
- source: unescape('selector%0A%09%5EtestSelector'),
30
- messageSends: [],
28
+ args: ["aBoolean", "aString"],
29
+ source: "assert: aBoolean description: aString\x0a\x09aBoolean ifFalse: [self signalFailure: aString]",
30
+ messageSends: ["ifFalse:", "signalFailure:"],
31
31
  referencedClasses: []
32
32
  }),
33
33
  smalltalk.TestCase);
34
34
 
35
35
  smalltalk.addMethod(
36
- unescape('_signalFailure_'),
36
+ "_assert_equals_",
37
37
  smalltalk.method({
38
- selector: unescape('signalFailure%3A'),
39
- category: 'private',
40
- fn: function (aString){
38
+ selector: "assert:equals:",
39
+ category: 'testing',
40
+ fn: function (expected, actual){
41
41
  var self=this;
42
- (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.TestFailure || TestFailure), "_new", []));
42
+ return smalltalk.send(self, "_assert_description_", [smalltalk.send(expected, "__eq", [actual]), smalltalk.send(smalltalk.send(smalltalk.send("Expected: ", "__comma", [smalltalk.send(expected, "_asString", [])]), "__comma", [" but was: "]), "__comma", [smalltalk.send(actual, "_asString", [])])]);
43
43
  return self;},
44
- args: ["aString"],
45
- source: unescape('signalFailure%3A%20aString%0A%09TestFailure%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
46
- messageSends: ["messageText:", "signal", "new"],
47
- referencedClasses: ["TestFailure"]
44
+ args: ["expected", "actual"],
45
+ source: "assert: expected equals: actual\x0a\x09^ self assert: (expected = actual) description: 'Expected: ', expected asString, ' but was: ', actual asString",
46
+ messageSends: ["assert:description:", "=", ",", "asString"],
47
+ referencedClasses: []
48
48
  }),
49
49
  smalltalk.TestCase);
50
50
 
51
51
  smalltalk.addMethod(
52
- unescape('_setUp'),
52
+ "_deny_",
53
53
  smalltalk.method({
54
- selector: unescape('setUp'),
55
- category: 'running',
56
- fn: function (){
54
+ selector: "deny:",
55
+ category: 'testing',
56
+ fn: function (aBoolean){
57
57
  var self=this;
58
-
58
+ smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
59
59
  return self;},
60
- args: [],
61
- source: unescape('setUp'),
62
- messageSends: [],
60
+ args: ["aBoolean"],
61
+ source: "deny: aBoolean\x0a\x09self assert: aBoolean not",
62
+ messageSends: ["assert:", "not"],
63
63
  referencedClasses: []
64
64
  }),
65
65
  smalltalk.TestCase);
66
66
 
67
67
  smalltalk.addMethod(
68
- unescape('_tearDown'),
68
+ "_performTestFor_",
69
69
  smalltalk.method({
70
- selector: unescape('tearDown'),
70
+ selector: "performTestFor:",
71
71
  category: 'running',
72
- fn: function (){
72
+ fn: function (aResult){
73
73
  var self=this;
74
-
74
+ smalltalk.send((function(){return smalltalk.send((function(){return smalltalk.send(self, "_perform_", [smalltalk.send(self, "_selector", [])]);}), "_on_do_", [(smalltalk.TestFailure || TestFailure), (function(ex){return smalltalk.send(aResult, "_addFailure_", [self]);})]);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return smalltalk.send(aResult, "_addError_", [self]);})]);
75
75
  return self;},
76
- args: [],
77
- source: unescape('tearDown'),
78
- messageSends: [],
79
- referencedClasses: []
76
+ args: ["aResult"],
77
+ source: "performTestFor: aResult\x0a\x09[[self perform: self selector]\x0a\x09\x09on: TestFailure do: [:ex | aResult addFailure: self]]\x0a\x09\x09on: Error do: [:ex | aResult addError: self]",
78
+ messageSends: ["on:do:", "perform:", "selector", "addFailure:", "addError:"],
79
+ referencedClasses: ["TestFailure", "Error"]
80
80
  }),
81
81
  smalltalk.TestCase);
82
82
 
83
83
  smalltalk.addMethod(
84
- unescape('_runCaseFor_'),
84
+ "_runCaseFor_",
85
85
  smalltalk.method({
86
- selector: unescape('runCaseFor%3A'),
86
+ selector: "runCaseFor:",
87
87
  category: 'running',
88
88
  fn: function (aTestResult){
89
89
  var self=this;
@@ -93,220 +93,220 @@ smalltalk.send(self, "_performTestFor_", [aTestResult]);
93
93
  smalltalk.send(self, "_tearDown", []);
94
94
  return self;},
95
95
  args: ["aTestResult"],
96
- source: unescape('runCaseFor%3A%20aTestResult%0A%09self%20setUp.%0A%09aTestResult%20increaseRuns.%0A%09self%20performTestFor%3A%20aTestResult.%0A%09self%20tearDown'),
96
+ source: "runCaseFor: aTestResult\x0a\x09self setUp.\x0a\x09aTestResult increaseRuns.\x0a\x09self performTestFor: aTestResult.\x0a\x09self tearDown",
97
97
  messageSends: ["setUp", "increaseRuns", "performTestFor:", "tearDown"],
98
98
  referencedClasses: []
99
99
  }),
100
100
  smalltalk.TestCase);
101
101
 
102
102
  smalltalk.addMethod(
103
- unescape('_performTestFor_'),
103
+ "_selector",
104
104
  smalltalk.method({
105
- selector: unescape('performTestFor%3A'),
106
- category: 'running',
107
- fn: function (aResult){
105
+ selector: "selector",
106
+ category: 'accessing',
107
+ fn: function (){
108
108
  var self=this;
109
- smalltalk.send((function(){return smalltalk.send((function(){return smalltalk.send(self, "_perform_", [smalltalk.send(self, "_selector", [])]);}), "_on_do_", [(smalltalk.TestFailure || TestFailure), (function(ex){return smalltalk.send(aResult, "_addFailure_", [self]);})]);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return smalltalk.send(aResult, "_addError_", [self]);})]);
109
+ return self['@testSelector'];
110
110
  return self;},
111
- args: ["aResult"],
112
- source: unescape('performTestFor%3A%20aResult%0A%09%5B%5Bself%20perform%3A%20self%20selector%5D%0A%09%09on%3A%20TestFailure%20do%3A%20%5B%3Aex%20%7C%20aResult%20addFailure%3A%20self%5D%5D%0A%09%09on%3A%20Error%20do%3A%20%5B%3Aex%20%7C%20aResult%20addError%3A%20self%5D'),
113
- messageSends: ["on:do:", "perform:", "selector", "addFailure:", "addError:"],
114
- referencedClasses: ["TestFailure", "Error"]
111
+ args: [],
112
+ source: "selector\x0a\x09^testSelector",
113
+ messageSends: [],
114
+ referencedClasses: []
115
115
  }),
116
116
  smalltalk.TestCase);
117
117
 
118
118
  smalltalk.addMethod(
119
- unescape('_assert_'),
119
+ "_setTestSelector_",
120
120
  smalltalk.method({
121
- selector: unescape('assert%3A'),
122
- category: 'testing',
123
- fn: function (aBoolean){
121
+ selector: "setTestSelector:",
122
+ category: 'accessing',
123
+ fn: function (aSelector){
124
124
  var self=this;
125
- smalltalk.send(self, "_assert_description_", [aBoolean, "Assertion failed"]);
125
+ (self['@testSelector']=aSelector);
126
126
  return self;},
127
- args: ["aBoolean"],
128
- source: unescape('assert%3A%20aBoolean%0A%09self%20assert%3A%20aBoolean%20description%3A%20%27Assertion%20failed%27'),
129
- messageSends: ["assert:description:"],
127
+ args: ["aSelector"],
128
+ source: "setTestSelector: aSelector\x0a\x09testSelector := aSelector",
129
+ messageSends: [],
130
130
  referencedClasses: []
131
131
  }),
132
132
  smalltalk.TestCase);
133
133
 
134
134
  smalltalk.addMethod(
135
- unescape('_deny_'),
135
+ "_setUp",
136
136
  smalltalk.method({
137
- selector: unescape('deny%3A'),
138
- category: 'testing',
139
- fn: function (aBoolean){
137
+ selector: "setUp",
138
+ category: 'running',
139
+ fn: function (){
140
140
  var self=this;
141
- smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
141
+
142
142
  return self;},
143
- args: ["aBoolean"],
144
- source: unescape('deny%3A%20aBoolean%0A%09self%20assert%3A%20aBoolean%20not'),
145
- messageSends: ["assert:", "not"],
143
+ args: [],
144
+ source: "setUp",
145
+ messageSends: [],
146
146
  referencedClasses: []
147
147
  }),
148
148
  smalltalk.TestCase);
149
149
 
150
150
  smalltalk.addMethod(
151
- unescape('_assert_equals_'),
151
+ "_should_",
152
152
  smalltalk.method({
153
- selector: unescape('assert%3Aequals%3A'),
153
+ selector: "should:",
154
154
  category: 'testing',
155
- fn: function (expected, actual){
155
+ fn: function (aBlock){
156
156
  var self=this;
157
- return smalltalk.send(self, "_assert_description_", [smalltalk.send(expected, "__eq", [actual]), smalltalk.send(smalltalk.send(smalltalk.send("Expected: ", "__comma", [smalltalk.send(expected, "_asString", [])]), "__comma", [" but was: "]), "__comma", [smalltalk.send(actual, "_asString", [])])]);
157
+ smalltalk.send(self, "_assert_", [smalltalk.send(aBlock, "_value", [])]);
158
158
  return self;},
159
- args: ["expected", "actual"],
160
- source: unescape('assert%3A%20expected%20equals%3A%20actual%0A%09%5E%20self%20assert%3A%20%28expected%20%3D%20actual%29%20description%3A%20%27Expected%3A%20%27%2C%20expected%20asString%2C%20%27%20but%20was%3A%20%27%2C%20actual%20asString'),
161
- messageSends: ["assert:description:", unescape("%3D"), unescape("%2C"), "asString"],
159
+ args: ["aBlock"],
160
+ source: "should: aBlock\x0a\x09self assert: aBlock value",
161
+ messageSends: ["assert:", "value"],
162
162
  referencedClasses: []
163
163
  }),
164
164
  smalltalk.TestCase);
165
165
 
166
166
  smalltalk.addMethod(
167
- unescape('_assert_description_'),
167
+ "_should_raise_",
168
168
  smalltalk.method({
169
- selector: unescape('assert%3Adescription%3A'),
169
+ selector: "should:raise:",
170
170
  category: 'testing',
171
- fn: function (aBoolean, aString){
171
+ fn: function (aBlock, anExceptionClass){
172
172
  var self=this;
173
- ((($receiver = aBoolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_signalFailure_", [aString]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_signalFailure_", [aString]);})]));
173
+ smalltalk.send(self, "_assert_", [smalltalk.send((function(){smalltalk.send(aBlock, "_value", []);return false;}), "_on_do_", [anExceptionClass, (function(ex){return true;})])]);
174
174
  return self;},
175
- args: ["aBoolean", "aString"],
176
- source: unescape('assert%3A%20aBoolean%20description%3A%20aString%0A%09aBoolean%20ifFalse%3A%20%5Bself%20signalFailure%3A%20aString%5D'),
177
- messageSends: ["ifFalse:", "signalFailure:"],
175
+ args: ["aBlock", "anExceptionClass"],
176
+ source: "should: aBlock raise: anExceptionClass\x0a\x09self assert: ([aBlock value. false] \x0a\x09\x09on: anExceptionClass \x0a\x09\x09do: [:ex | true])",
177
+ messageSends: ["assert:", "on:do:", "value"],
178
178
  referencedClasses: []
179
179
  }),
180
180
  smalltalk.TestCase);
181
181
 
182
182
  smalltalk.addMethod(
183
- unescape('_should_'),
183
+ "_signalFailure_",
184
184
  smalltalk.method({
185
- selector: unescape('should%3A'),
186
- category: 'testing',
187
- fn: function (aBlock){
185
+ selector: "signalFailure:",
186
+ category: 'private',
187
+ fn: function (aString){
188
188
  var self=this;
189
- smalltalk.send(self, "_assert_", [smalltalk.send(aBlock, "_value", [])]);
189
+ (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.TestFailure || TestFailure), "_new", []));
190
190
  return self;},
191
- args: ["aBlock"],
192
- source: unescape('should%3A%20aBlock%0A%09self%20assert%3A%20aBlock%20value'),
193
- messageSends: ["assert:", "value"],
194
- referencedClasses: []
191
+ args: ["aString"],
192
+ source: "signalFailure: aString\x0a\x09TestFailure new\x0a\x09\x09messageText: aString;\x0a\x09\x09signal",
193
+ messageSends: ["messageText:", "signal", "new"],
194
+ referencedClasses: ["TestFailure"]
195
195
  }),
196
196
  smalltalk.TestCase);
197
197
 
198
198
  smalltalk.addMethod(
199
- unescape('_should_raise_'),
199
+ "_tearDown",
200
200
  smalltalk.method({
201
- selector: unescape('should%3Araise%3A'),
202
- category: 'testing',
203
- fn: function (aBlock, anExceptionClass){
201
+ selector: "tearDown",
202
+ category: 'running',
203
+ fn: function (){
204
204
  var self=this;
205
- smalltalk.send(self, "_assert_", [smalltalk.send((function(){smalltalk.send(aBlock, "_value", []);return false;}), "_on_do_", [anExceptionClass, (function(ex){return true;})])]);
205
+
206
206
  return self;},
207
- args: ["aBlock", "anExceptionClass"],
208
- source: unescape('should%3A%20aBlock%20raise%3A%20anExceptionClass%0A%09self%20assert%3A%20%28%5BaBlock%20value.%20false%5D%20%0A%09%09on%3A%20anExceptionClass%20%0A%09%09do%3A%20%5B%3Aex%20%7C%20true%5D%29'),
209
- messageSends: ["assert:", "on:do:", "value"],
207
+ args: [],
208
+ source: "tearDown",
209
+ messageSends: [],
210
210
  referencedClasses: []
211
211
  }),
212
212
  smalltalk.TestCase);
213
213
 
214
214
 
215
215
  smalltalk.addMethod(
216
- unescape('_testSelectors'),
216
+ "_allTestSelectors",
217
217
  smalltalk.method({
218
- selector: unescape('testSelectors'),
218
+ selector: "allTestSelectors",
219
219
  category: 'accessing',
220
220
  fn: function (){
221
221
  var self=this;
222
- return smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_select_", [(function(each){return smalltalk.send(each, "_match_", [unescape("%5Etest")]);})]);
222
+ var selectors=nil;
223
+ (selectors=smalltalk.send(self, "_testSelectors", []));
224
+ ((($receiver = smalltalk.send(self, "_shouldInheritSelectors", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})]));
225
+ return selectors;
223
226
  return self;},
224
227
  args: [],
225
- source: unescape('testSelectors%0A%09%5Eself%20methodDictionary%20keys%20select%3A%20%5B%3Aeach%20%7C%20each%20match%3A%20%27%5Etest%27%5D'),
226
- messageSends: ["select:", "keys", "methodDictionary", "match:"],
228
+ source: "allTestSelectors\x0a\x09| selectors |\x0a\x09selectors := self testSelectors.\x0a\x09self shouldInheritSelectors ifTrue: [\x0a\x09\x09selectors addAll: self superclass allTestSelectors].\x0a\x09^selectors",
229
+ messageSends: ["testSelectors", "ifTrue:", "shouldInheritSelectors", "addAll:", "allTestSelectors", "superclass"],
227
230
  referencedClasses: []
228
231
  }),
229
232
  smalltalk.TestCase.klass);
230
233
 
231
234
  smalltalk.addMethod(
232
- unescape('_selector_'),
235
+ "_buildSuite",
233
236
  smalltalk.method({
234
- selector: unescape('selector%3A'),
237
+ selector: "buildSuite",
235
238
  category: 'accessing',
236
- fn: function (aSelector){
239
+ fn: function (){
237
240
  var self=this;
238
- return (function($rec){smalltalk.send($rec, "_setTestSelector_", [aSelector]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
241
+ return smalltalk.send(smalltalk.send(self, "_allTestSelectors", []), "_collect_", [(function(each){return smalltalk.send(self, "_selector_", [each]);})]);
239
242
  return self;},
240
- args: ["aSelector"],
241
- source: unescape('selector%3A%20aSelector%0A%09%5Eself%20new%0A%09%09setTestSelector%3A%20aSelector%3B%0A%09%09yourself'),
242
- messageSends: ["setTestSelector:", "yourself", "new"],
243
+ args: [],
244
+ source: "buildSuite\x0a\x09^self allTestSelectors collect: [:each | self selector: each]",
245
+ messageSends: ["collect:", "allTestSelectors", "selector:"],
243
246
  referencedClasses: []
244
247
  }),
245
248
  smalltalk.TestCase.klass);
246
249
 
247
250
  smalltalk.addMethod(
248
- unescape('_lookupHierarchyRoot'),
251
+ "_lookupHierarchyRoot",
249
252
  smalltalk.method({
250
- selector: unescape('lookupHierarchyRoot'),
253
+ selector: "lookupHierarchyRoot",
251
254
  category: 'accessing',
252
255
  fn: function (){
253
256
  var self=this;
254
257
  return (smalltalk.TestCase || TestCase);
255
258
  return self;},
256
259
  args: [],
257
- source: unescape('lookupHierarchyRoot%0A%09%5ETestCase'),
260
+ source: "lookupHierarchyRoot\x0a\x09^TestCase",
258
261
  messageSends: [],
259
262
  referencedClasses: ["TestCase"]
260
263
  }),
261
264
  smalltalk.TestCase.klass);
262
265
 
263
266
  smalltalk.addMethod(
264
- unescape('_allTestSelectors'),
267
+ "_selector_",
265
268
  smalltalk.method({
266
- selector: unescape('allTestSelectors'),
269
+ selector: "selector:",
267
270
  category: 'accessing',
268
- fn: function (){
271
+ fn: function (aSelector){
269
272
  var self=this;
270
- var selectors=nil;
271
- (selectors=smalltalk.send(self, "_testSelectors", []));
272
- ((($receiver = smalltalk.send(self, "_shouldInheritSelectors", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})]));
273
- return selectors;
273
+ return (function($rec){smalltalk.send($rec, "_setTestSelector_", [aSelector]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
274
274
  return self;},
275
- args: [],
276
- source: unescape('allTestSelectors%0A%09%7C%20selectors%20%7C%0A%09selectors%20%3A%3D%20self%20testSelectors.%0A%09self%20shouldInheritSelectors%20ifTrue%3A%20%5B%0A%09%09selectors%20addAll%3A%20self%20superclass%20allTestSelectors%5D.%0A%09%5Eselectors'),
277
- messageSends: ["testSelectors", "ifTrue:", "shouldInheritSelectors", "addAll:", "allTestSelectors", "superclass"],
275
+ args: ["aSelector"],
276
+ source: "selector: aSelector\x0a\x09^self new\x0a\x09\x09setTestSelector: aSelector;\x0a\x09\x09yourself",
277
+ messageSends: ["setTestSelector:", "yourself", "new"],
278
278
  referencedClasses: []
279
279
  }),
280
280
  smalltalk.TestCase.klass);
281
281
 
282
282
  smalltalk.addMethod(
283
- unescape('_buildSuite'),
283
+ "_shouldInheritSelectors",
284
284
  smalltalk.method({
285
- selector: unescape('buildSuite'),
286
- category: 'accessing',
285
+ selector: "shouldInheritSelectors",
286
+ category: 'testing',
287
287
  fn: function (){
288
288
  var self=this;
289
- return smalltalk.send(smalltalk.send(self, "_allTestSelectors", []), "_collect_", [(function(each){return smalltalk.send(self, "_selector_", [each]);})]);
289
+ return smalltalk.send(self, "_~_eq", [smalltalk.send(self, "_lookupHierarchyRoot", [])]);
290
290
  return self;},
291
291
  args: [],
292
- source: unescape('buildSuite%0A%09%5Eself%20allTestSelectors%20collect%3A%20%5B%3Aeach%20%7C%20self%20selector%3A%20each%5D'),
293
- messageSends: ["collect:", "allTestSelectors", "selector:"],
292
+ source: "shouldInheritSelectors\x0a\x09^self ~= self lookupHierarchyRoot",
293
+ messageSends: ["~=", "lookupHierarchyRoot"],
294
294
  referencedClasses: []
295
295
  }),
296
296
  smalltalk.TestCase.klass);
297
297
 
298
298
  smalltalk.addMethod(
299
- unescape('_shouldInheritSelectors'),
299
+ "_testSelectors",
300
300
  smalltalk.method({
301
- selector: unescape('shouldInheritSelectors'),
302
- category: 'testing',
301
+ selector: "testSelectors",
302
+ category: 'accessing',
303
303
  fn: function (){
304
304
  var self=this;
305
- return smalltalk.send(self, "_~_eq", [smalltalk.send(self, "_lookupHierarchyRoot", [])]);
305
+ return smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_select_", [(function(each){return smalltalk.send(each, "_match_", ["^test"]);})]);
306
306
  return self;},
307
307
  args: [],
308
- source: unescape('shouldInheritSelectors%0A%09%5Eself%20%7E%3D%20self%20lookupHierarchyRoot'),
309
- messageSends: [unescape("%7E%3D"), "lookupHierarchyRoot"],
308
+ source: "testSelectors\x0a\x09^self methodDictionary keys select: [:each | each match: '^test']",
309
+ messageSends: ["select:", "keys", "methodDictionary", "match:"],
310
310
  referencedClasses: []
311
311
  }),
312
312
  smalltalk.TestCase.klass);
@@ -317,183 +317,183 @@ smalltalk.addClass('TestFailure', smalltalk.Error, [], 'SUnit');
317
317
 
318
318
  smalltalk.addClass('TestResult', smalltalk.Object, ['timestamp', 'runs', 'errors', 'failures', 'total'], 'SUnit');
319
319
  smalltalk.addMethod(
320
- unescape('_timestamp'),
320
+ "_addError_",
321
321
  smalltalk.method({
322
- selector: unescape('timestamp'),
322
+ selector: "addError:",
323
323
  category: 'accessing',
324
- fn: function (){
324
+ fn: function (anError){
325
325
  var self=this;
326
- return self['@timestamp'];
326
+ smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
327
327
  return self;},
328
- args: [],
329
- source: unescape('timestamp%0A%09%5Etimestamp'),
330
- messageSends: [],
328
+ args: ["anError"],
329
+ source: "addError: anError\x0a\x09self errors add: anError",
330
+ messageSends: ["add:", "errors"],
331
331
  referencedClasses: []
332
332
  }),
333
333
  smalltalk.TestResult);
334
334
 
335
335
  smalltalk.addMethod(
336
- unescape('_errors'),
336
+ "_addFailure_",
337
337
  smalltalk.method({
338
- selector: unescape('errors'),
338
+ selector: "addFailure:",
339
339
  category: 'accessing',
340
- fn: function (){
340
+ fn: function (aFailure){
341
341
  var self=this;
342
- return self['@errors'];
342
+ smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
343
343
  return self;},
344
- args: [],
345
- source: unescape('errors%0A%09%5Eerrors'),
346
- messageSends: [],
344
+ args: ["aFailure"],
345
+ source: "addFailure: aFailure\x0a\x09self failures add: aFailure",
346
+ messageSends: ["add:", "failures"],
347
347
  referencedClasses: []
348
348
  }),
349
349
  smalltalk.TestResult);
350
350
 
351
351
  smalltalk.addMethod(
352
- unescape('_failures'),
352
+ "_errors",
353
353
  smalltalk.method({
354
- selector: unescape('failures'),
354
+ selector: "errors",
355
355
  category: 'accessing',
356
356
  fn: function (){
357
357
  var self=this;
358
- return self['@failures'];
358
+ return self['@errors'];
359
359
  return self;},
360
360
  args: [],
361
- source: unescape('failures%0A%09%5Efailures'),
361
+ source: "errors\x0a\x09^errors",
362
362
  messageSends: [],
363
363
  referencedClasses: []
364
364
  }),
365
365
  smalltalk.TestResult);
366
366
 
367
367
  smalltalk.addMethod(
368
- unescape('_total'),
368
+ "_failures",
369
369
  smalltalk.method({
370
- selector: unescape('total'),
370
+ selector: "failures",
371
371
  category: 'accessing',
372
372
  fn: function (){
373
373
  var self=this;
374
- return self['@total'];
374
+ return self['@failures'];
375
375
  return self;},
376
376
  args: [],
377
- source: unescape('total%0A%09%5Etotal'),
377
+ source: "failures\x0a\x09^failures",
378
378
  messageSends: [],
379
379
  referencedClasses: []
380
380
  }),
381
381
  smalltalk.TestResult);
382
382
 
383
383
  smalltalk.addMethod(
384
- unescape('_total_'),
384
+ "_increaseRuns",
385
385
  smalltalk.method({
386
- selector: unescape('total%3A'),
386
+ selector: "increaseRuns",
387
387
  category: 'accessing',
388
- fn: function (aNumber){
388
+ fn: function (){
389
389
  var self=this;
390
- (self['@total']=aNumber);
390
+ (self['@runs']=((($receiver = self['@runs']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
391
391
  return self;},
392
- args: ["aNumber"],
393
- source: unescape('total%3A%20aNumber%0A%09total%20%3A%3D%20aNumber'),
394
- messageSends: [],
392
+ args: [],
393
+ source: "increaseRuns\x0a\x09runs := runs + 1",
394
+ messageSends: ["+"],
395
395
  referencedClasses: []
396
396
  }),
397
397
  smalltalk.TestResult);
398
398
 
399
399
  smalltalk.addMethod(
400
- unescape('_addError_'),
400
+ "_initialize",
401
401
  smalltalk.method({
402
- selector: unescape('addError%3A'),
403
- category: 'accessing',
404
- fn: function (anError){
402
+ selector: "initialize",
403
+ category: 'initialization',
404
+ fn: function (){
405
405
  var self=this;
406
- smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
406
+ smalltalk.send(self, "_initialize", [], smalltalk.TestResult.superclass || nil);
407
+ (self['@timestamp']=smalltalk.send((smalltalk.Date || Date), "_now", []));
408
+ (self['@runs']=(0));
409
+ (self['@errors']=smalltalk.send((smalltalk.Array || Array), "_new", []));
410
+ (self['@failures']=smalltalk.send((smalltalk.Array || Array), "_new", []));
411
+ (self['@total']=(0));
407
412
  return self;},
408
- args: ["anError"],
409
- source: unescape('addError%3A%20anError%0A%09self%20errors%20add%3A%20anError'),
410
- messageSends: ["add:", "errors"],
411
- referencedClasses: []
413
+ args: [],
414
+ source: "initialize\x0a\x09super initialize.\x0a\x09timestamp := Date now.\x0a\x09runs := 0.\x0a\x09errors := Array new.\x0a\x09failures := Array new.\x0a\x09total := 0",
415
+ messageSends: ["initialize", "now", "new"],
416
+ referencedClasses: ["Date", "Array"]
412
417
  }),
413
418
  smalltalk.TestResult);
414
419
 
415
420
  smalltalk.addMethod(
416
- unescape('_addFailure_'),
421
+ "_runs",
417
422
  smalltalk.method({
418
- selector: unescape('addFailure%3A'),
423
+ selector: "runs",
419
424
  category: 'accessing',
420
- fn: function (aFailure){
425
+ fn: function (){
421
426
  var self=this;
422
- smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
427
+ return self['@runs'];
423
428
  return self;},
424
- args: ["aFailure"],
425
- source: unescape('addFailure%3A%20aFailure%0A%09self%20failures%20add%3A%20aFailure'),
426
- messageSends: ["add:", "failures"],
429
+ args: [],
430
+ source: "runs\x0a\x09^runs",
431
+ messageSends: [],
427
432
  referencedClasses: []
428
433
  }),
429
434
  smalltalk.TestResult);
430
435
 
431
436
  smalltalk.addMethod(
432
- unescape('_runs'),
437
+ "_status",
433
438
  smalltalk.method({
434
- selector: unescape('runs'),
439
+ selector: "status",
435
440
  category: 'accessing',
436
441
  fn: function (){
437
442
  var self=this;
438
- return self['@runs'];
443
+ return ((($receiver = smalltalk.send(smalltalk.send(self, "_errors", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));})() : (function(){return "error";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));}), (function(){return "error";})]));
439
444
  return self;},
440
445
  args: [],
441
- source: unescape('runs%0A%09%5Eruns'),
442
- messageSends: [],
446
+ source: "status\x0a\x09^self errors isEmpty \x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self failures isEmpty \x0a\x09\x09\x09\x09ifTrue: ['success']\x0a\x09\x09\x09\x09ifFalse: ['failure']]\x0a\x09\x09ifFalse: ['error']",
447
+ messageSends: ["ifTrue:ifFalse:", "isEmpty", "errors", "failures"],
443
448
  referencedClasses: []
444
449
  }),
445
450
  smalltalk.TestResult);
446
451
 
447
452
  smalltalk.addMethod(
448
- unescape('_increaseRuns'),
453
+ "_timestamp",
449
454
  smalltalk.method({
450
- selector: unescape('increaseRuns'),
455
+ selector: "timestamp",
451
456
  category: 'accessing',
452
457
  fn: function (){
453
458
  var self=this;
454
- (self['@runs']=((($receiver = self['@runs']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
459
+ return self['@timestamp'];
455
460
  return self;},
456
461
  args: [],
457
- source: unescape('increaseRuns%0A%09runs%20%3A%3D%20runs%20+%201'),
458
- messageSends: [unescape("+")],
462
+ source: "timestamp\x0a\x09^timestamp",
463
+ messageSends: [],
459
464
  referencedClasses: []
460
465
  }),
461
466
  smalltalk.TestResult);
462
467
 
463
468
  smalltalk.addMethod(
464
- unescape('_status'),
469
+ "_total",
465
470
  smalltalk.method({
466
- selector: unescape('status'),
471
+ selector: "total",
467
472
  category: 'accessing',
468
473
  fn: function (){
469
474
  var self=this;
470
- return ((($receiver = smalltalk.send(smalltalk.send(self, "_errors", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));})() : (function(){return "error";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));}), (function(){return "error";})]));
475
+ return self['@total'];
471
476
  return self;},
472
477
  args: [],
473
- source: unescape('status%0A%09%5Eself%20errors%20isEmpty%20%0A%09%09ifTrue%3A%20%5B%0A%09%09%09self%20failures%20isEmpty%20%0A%09%09%09%09ifTrue%3A%20%5B%27success%27%5D%0A%09%09%09%09ifFalse%3A%20%5B%27failure%27%5D%5D%0A%09%09ifFalse%3A%20%5B%27error%27%5D'),
474
- messageSends: ["ifTrue:ifFalse:", "isEmpty", "errors", "failures"],
478
+ source: "total\x0a\x09^total",
479
+ messageSends: [],
475
480
  referencedClasses: []
476
481
  }),
477
482
  smalltalk.TestResult);
478
483
 
479
484
  smalltalk.addMethod(
480
- unescape('_initialize'),
485
+ "_total_",
481
486
  smalltalk.method({
482
- selector: unescape('initialize'),
483
- category: 'initialization',
484
- fn: function (){
487
+ selector: "total:",
488
+ category: 'accessing',
489
+ fn: function (aNumber){
485
490
  var self=this;
486
- smalltalk.send(self, "_initialize", [], smalltalk.Object);
487
- (self['@timestamp']=smalltalk.send((smalltalk.Date || Date), "_now", []));
488
- (self['@runs']=(0));
489
- (self['@errors']=smalltalk.send((smalltalk.Array || Array), "_new", []));
490
- (self['@failures']=smalltalk.send((smalltalk.Array || Array), "_new", []));
491
- (self['@total']=(0));
491
+ (self['@total']=aNumber);
492
492
  return self;},
493
- args: [],
494
- source: unescape('initialize%0A%09super%20initialize.%0A%09timestamp%20%3A%3D%20Date%20now.%0A%09runs%20%3A%3D%200.%0A%09errors%20%3A%3D%20Array%20new.%0A%09failures%20%3A%3D%20Array%20new.%0A%09total%20%3A%3D%200'),
495
- messageSends: ["initialize", "now", "new"],
496
- referencedClasses: ["Date", "Array"]
493
+ args: ["aNumber"],
494
+ source: "total: aNumber\x0a\x09total := aNumber",
495
+ messageSends: [],
496
+ referencedClasses: []
497
497
  }),
498
498
  smalltalk.TestResult);
499
499