resin 0.2.1 → 0.2.2

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 (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,32 +1,55 @@
1
1
  smalltalk.addPackage('Kernel-Tests', {});
2
2
  smalltalk.addClass('ArrayTest', smalltalk.TestCase, [], 'Kernel-Tests');
3
3
  smalltalk.addMethod(
4
- unescape('_testFirstN'),
4
+ "_testAtIfAbsent",
5
5
  smalltalk.method({
6
- selector: unescape('testFirstN'),
6
+ selector: "testAtIfAbsent",
7
+ category: 'testing',
8
+ fn: function (){
9
+ var self=this;
10
+ var array=nil;
11
+ (array=["hello", "world"]);
12
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(array, "_at_", [(1)]), "hello"]);
13
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(array, "_at_", [(2)]), "world"]);
14
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(array, "_at_ifAbsent_", [(2), (function(){return "not found";})]), "world"]);
15
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(array, "_at_ifAbsent_", [(0), (function(){return "not found";})]), "not found"]);
16
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(array, "_at_ifAbsent_", [(-10), (function(){return "not found";})]), "not found"]);
17
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(array, "_at_ifAbsent_", [(3), (function(){return "not found";})]), "not found"]);
18
+ return self;},
19
+ args: [],
20
+ 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'.",
21
+ messageSends: ["assert:equals:", "at:", "at:ifAbsent:"],
22
+ referencedClasses: []
23
+ }),
24
+ smalltalk.ArrayTest);
25
+
26
+ smalltalk.addMethod(
27
+ "_testFirstN",
28
+ smalltalk.method({
29
+ selector: "testFirstN",
7
30
  category: 'testing',
8
31
  fn: function (){
9
32
  var self=this;
10
33
  smalltalk.send(self, "_assert_equals_", [[(1),(2),(3)], smalltalk.send([(1),(2),(3),(4),(5)], "_first_", [(3)])]);
11
34
  return self;},
12
35
  args: [],
13
- source: unescape('testFirstN%0A%09self%20assert%3A%20%7B1.%202.%203%7D%20equals%3A%20%28%7B1.%202.%A03.%204.%205%7D%20first%3A%203%29.'),
36
+ source: "testFirstN\x0a\x09self assert: {1. 2. 3} equals: ({1. 2. 3. 4. 5} first: 3).",
14
37
  messageSends: ["assert:equals:", "first:"],
15
38
  referencedClasses: []
16
39
  }),
17
40
  smalltalk.ArrayTest);
18
41
 
19
42
  smalltalk.addMethod(
20
- unescape('_testIfEmpty'),
43
+ "_testIfEmpty",
21
44
  smalltalk.method({
22
- selector: unescape('testIfEmpty'),
45
+ selector: "testIfEmpty",
23
46
  category: 'testing',
24
47
  fn: function (){
25
48
  var self=this;
26
49
  smalltalk.send(self, "_assert_equals_", ["zork", smalltalk.send("", "_ifEmpty_", [(function(){return "zork";})])]);
27
50
  return self;},
28
51
  args: [],
29
- source: unescape('testIfEmpty%0A%09self%20assert%3A%20%27zork%27%20equals%3A%20%28%20%27%27%20ifEmpty%3A%20%5B%27zork%27%5D%20%29'),
52
+ source: "testIfEmpty\x0a\x09self assert: 'zork' equals: ( '' ifEmpty: ['zork'] )",
30
53
  messageSends: ["assert:equals:", "ifEmpty:"],
31
54
  referencedClasses: []
32
55
  }),
@@ -34,244 +57,348 @@ smalltalk.ArrayTest);
34
57
 
35
58
 
36
59
 
37
- smalltalk.addClass('StringTest', smalltalk.TestCase, [], 'Kernel-Tests');
60
+ smalltalk.addClass('BlockClosureTest', smalltalk.TestCase, [], 'Kernel-Tests');
38
61
  smalltalk.addMethod(
39
- unescape('_testJoin'),
62
+ "_testCompiledSource",
40
63
  smalltalk.method({
41
- selector: unescape('testJoin'),
64
+ selector: "testCompiledSource",
42
65
  category: 'tests',
43
- fn: function () {
66
+ fn: function (){
44
67
  var self=this;
45
- smalltalk.send(self, "_assert_equals_", [unescape("hello%2Cworld"), smalltalk.send(unescape("%2C"), "_join_", [["hello", "world"]])]);
68
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((function(){return (1) + (1);}), "_compiledSource", []), "_includesSubString_", ["function"])]);
46
69
  return self;},
47
70
  args: [],
48
- source: unescape('testJoin%0A%09self%20assert%3A%20%27hello%2Cworld%27%20equals%3A%20%28%27%2C%27%20join%3A%20%23%28%27hello%27%20%27world%27%29%29'),
49
- messageSends: ["assert:equals:", "join:"],
71
+ source: "testCompiledSource\x0a\x09self assert: ([1+1] compiledSource includesSubString: 'function')",
72
+ messageSends: ["assert:", "includesSubString:", "compiledSource", "+"],
50
73
  referencedClasses: []
51
74
  }),
52
- smalltalk.StringTest);
75
+ smalltalk.BlockClosureTest);
53
76
 
54
77
  smalltalk.addMethod(
55
- unescape('_testStreamContents'),
78
+ "_testEnsure",
56
79
  smalltalk.method({
57
- selector: unescape('testStreamContents'),
80
+ selector: "testEnsure",
58
81
  category: 'tests',
59
- fn: function () {
82
+ fn: function (){
60
83
  var self=this;
61
- smalltalk.send(self, "_assert_equals_", ["hello world", smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["hello"]);smalltalk.send($rec, "_space", []);return smalltalk.send($rec, "_nextPutAll_", ["world"]);})(aStream);})])]);
84
+ smalltalk.send(self, "_assert_", [smalltalk.send((function(){return smalltalk.send((smalltalk.Error || Error), "_new", []);}), "_ensure_", [(function(){return true;})])]);
62
85
  return self;},
63
86
  args: [],
64
- source: unescape('testStreamContents%0A%09self%20%0A%09%09assert%3A%20%27hello%20world%27%20%0A%09%09equals%3A%20%28String%20streamContents%3A%20%5B%3AaStream%7C%20aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27hello%27%3B%20space%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27world%27%5D%29'),
65
- messageSends: ["assert:equals:", "streamContents:", "nextPutAll:", "space"],
66
- referencedClasses: ["String"]
87
+ source: "testEnsure\x0a\x09self assert: ([Error new] ensure: [true])",
88
+ messageSends: ["assert:", "ensure:", "new"],
89
+ referencedClasses: ["Error"]
67
90
  }),
68
- smalltalk.StringTest);
91
+ smalltalk.BlockClosureTest);
69
92
 
70
93
  smalltalk.addMethod(
71
- unescape('_testIncludesSubString'),
94
+ "_testNumArgs",
72
95
  smalltalk.method({
73
- selector: unescape('testIncludesSubString'),
96
+ selector: "testNumArgs",
74
97
  category: 'tests',
75
- fn: function () {
98
+ fn: function (){
76
99
  var self=this;
77
- smalltalk.send(self, "_assert_", [smalltalk.send("amber", "_includesSubString_", ["ber"])]);
78
- smalltalk.send(self, "_deny_", [smalltalk.send("amber", "_includesSubString_", ["zork"])]);
100
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(){return nil;}), "_numArgs", []), (0)]);
101
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(a, b){return nil;}), "_numArgs", []), (2)]);
79
102
  return self;},
80
103
  args: [],
81
- source: unescape('testIncludesSubString%0A%09self%20assert%3A%20%28%27amber%27%20includesSubString%3A%20%27ber%27%29.%0A%09self%20deny%3A%20%28%27amber%27%20includesSubString%3A%20%27zork%27%29.'),
82
- messageSends: ["assert:", "includesSubString:", "deny:"],
104
+ source: "testNumArgs\x0a\x09self assert: [] numArgs equals: 0.\x0a\x09self assert: [:a :b | ] numArgs equals: 2",
105
+ messageSends: ["assert:equals:", "numArgs"],
83
106
  referencedClasses: []
84
107
  }),
85
- smalltalk.StringTest);
108
+ smalltalk.BlockClosureTest);
86
109
 
87
110
  smalltalk.addMethod(
88
- unescape('_testEquality'),
111
+ "_testOnDo",
89
112
  smalltalk.method({
90
- selector: unescape('testEquality'),
113
+ selector: "testOnDo",
91
114
  category: 'tests',
92
- fn: function () {
115
+ fn: function (){
93
116
  var self=this;
94
- smalltalk.send(self, "_assert_", [smalltalk.send("hello", "__eq", ["hello"])]);
95
- smalltalk.send(self, "_deny_", [smalltalk.send("hello", "__eq", ["world"])]);
96
- smalltalk.send(self, "_assert_", [smalltalk.send("hello", "__eq", [smalltalk.send("hello", "_yourself", [])])]);
97
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_yourself", []), "__eq", ["hello"])]);
98
- smalltalk.send(self, "_deny_", [smalltalk.send("", "__eq", [(0)])]);
117
+ smalltalk.send(self, "_assert_", [smalltalk.send((function(){return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_signal", []);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return true;})])]);
99
118
  return self;},
100
119
  args: [],
101
- source: unescape('testEquality%0A%09self%20assert%3A%20%27hello%27%20%3D%20%27hello%27.%0A%09self%20deny%3A%20%27hello%27%20%3D%20%27world%27.%0A%0A%09self%20assert%3A%20%27hello%27%20%20%3D%20%27hello%27%20yourself.%0A%09self%20assert%3A%20%27hello%27%20yourself%20%3D%20%27hello%27.%0A%0A%09%22test%20JS%20falsy%20value%22%0A%09self%20deny%3A%20%27%27%20%3D%200'),
102
- messageSends: ["assert:", unescape("%3D"), "deny:", "yourself"],
103
- referencedClasses: []
120
+ source: "testOnDo\x0a\x09self assert: ([Error new signal] on: Error do: [:ex | true])",
121
+ messageSends: ["assert:", "on:do:", "signal", "new"],
122
+ referencedClasses: ["Error"]
104
123
  }),
105
- smalltalk.StringTest);
124
+ smalltalk.BlockClosureTest);
106
125
 
107
126
  smalltalk.addMethod(
108
- unescape('_testCopyWithoutAll'),
127
+ "_testValue",
109
128
  smalltalk.method({
110
- selector: unescape('testCopyWithoutAll'),
129
+ selector: "testValue",
111
130
  category: 'tests',
112
- fn: function () {
131
+ fn: function (){
113
132
  var self=this;
114
- smalltalk.send(self, "_assert_equals_", ["hello world", smalltalk.send(unescape("*hello*%20*world*"), "_copyWithoutAll_", [unescape("*")])]);
133
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(){return (1) + (1);}), "_value", []), (2)]);
134
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(x){return ((($receiver = x).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));}), "_value_", [(2)]), (3)]);
135
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(x, y){return ((($receiver = x).klass === smalltalk.Number) ? $receiver *y : smalltalk.send($receiver, "__star", [y]));}), "_value_value_", [(2), (4)]), (8)]);
136
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(a, b, c){return (1);}), "_value", []), (1)]);
115
137
  return self;},
116
138
  args: [],
117
- source: unescape('testCopyWithoutAll%0A%09self%20%0A%09%09assert%3A%20%27hello%20world%27%20%0A%09%09equals%3A%20%28%27*hello*%20*world*%27%20copyWithoutAll%3A%20%27*%27%29'),
118
- messageSends: ["assert:equals:", "copyWithoutAll:"],
139
+ 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",
140
+ messageSends: ["assert:equals:", "value", "+", "value:", "value:value:", "*"],
119
141
  referencedClasses: []
120
142
  }),
121
- smalltalk.StringTest);
143
+ smalltalk.BlockClosureTest);
122
144
 
123
145
  smalltalk.addMethod(
124
- unescape('_testAt'),
146
+ "_testValueWithPossibleArguments",
125
147
  smalltalk.method({
126
- selector: unescape('testAt'),
148
+ selector: "testValueWithPossibleArguments",
127
149
  category: 'tests',
128
- fn: function () {
150
+ fn: function (){
129
151
  var self=this;
130
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_at_", [(1)]), "__eq", ["h"])]);
131
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_at_", [(5)]), "__eq", ["o"])]);
132
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_at_ifAbsent_", [(6), (function(){return nil;})]), "__eq", [nil])]);
152
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(){return (1);}), "_valueWithPossibleArguments_", [[(3), (4)]]), (1)]);
153
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(a){return ((($receiver = a).klass === smalltalk.Number) ? $receiver +(4) : smalltalk.send($receiver, "__plus", [(4)]));}), "_valueWithPossibleArguments_", [[(3), (4)]]), (7)]);
154
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(a, b){return ((($receiver = a).klass === smalltalk.Number) ? $receiver +b : smalltalk.send($receiver, "__plus", [b]));}), "_valueWithPossibleArguments_", [[(3), (4), (5)]]), (7)]);
133
155
  return self;},
134
156
  args: [],
135
- source: unescape('testAt%0A%09self%20assert%3A%20%28%27hello%27%20at%3A%201%29%20%3D%20%27h%27.%0A%09self%20assert%3A%20%28%27hello%27%20at%3A%205%29%20%3D%20%27o%27.%0A%09self%20assert%3A%20%28%27hello%27%20at%3A%206%20ifAbsent%3A%20%5Bnil%5D%29%20%3D%20nil'),
136
- messageSends: ["assert:", unescape("%3D"), "at:", "at:ifAbsent:"],
157
+ 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.",
158
+ messageSends: ["assert:equals:", "valueWithPossibleArguments:", "+"],
137
159
  referencedClasses: []
138
160
  }),
139
- smalltalk.StringTest);
161
+ smalltalk.BlockClosureTest);
140
162
 
141
163
  smalltalk.addMethod(
142
- unescape('_testAtPut'),
164
+ "_testWhileFalse",
143
165
  smalltalk.method({
144
- selector: unescape('testAtPut'),
166
+ selector: "testWhileFalse",
145
167
  category: 'tests',
146
- fn: function () {
168
+ fn: function (){
147
169
  var self=this;
148
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send("hello", "_at_put_", [(1), "a"]);}), (smalltalk.Error || Error)]);
170
+ var i=nil;
171
+ (i=(0));
172
+ (function(){while(!(function(){return ((($receiver = i).klass === smalltalk.Number) ? $receiver >(5) : smalltalk.send($receiver, "__gt", [(5)]));})()) {(function(){return (i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
173
+ smalltalk.send(self, "_assert_equals_", [i, (6)]);
174
+ (i=(0));
175
+ (function(){while(!(function(){(i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return ((($receiver = i).klass === smalltalk.Number) ? $receiver >(5) : smalltalk.send($receiver, "__gt", [(5)]));})()) {}})();
176
+ smalltalk.send(self, "_assert_equals_", [i, (6)]);
149
177
  return self;},
150
178
  args: [],
151
- source: unescape('testAtPut%0A%09%22String%20instances%20are%20read-only%22%0A%09self%20should%3A%20%5B%27hello%27%20at%3A%201%20put%3A%20%27a%27%5D%20raise%3A%20Error'),
152
- messageSends: ["should:raise:", "at:put:"],
153
- referencedClasses: ["Error"]
179
+ 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",
180
+ messageSends: ["whileFalse:", ">", "+", "assert:equals:", "whileFalse"],
181
+ referencedClasses: []
154
182
  }),
155
- smalltalk.StringTest);
183
+ smalltalk.BlockClosureTest);
156
184
 
157
185
  smalltalk.addMethod(
158
- unescape('_testSize'),
186
+ "_testWhileTrue",
159
187
  smalltalk.method({
160
- selector: unescape('testSize'),
188
+ selector: "testWhileTrue",
161
189
  category: 'tests',
162
- fn: function () {
190
+ fn: function (){
163
191
  var self=this;
164
- smalltalk.send(self, "_assert_equals_", [smalltalk.send("smalltalk", "_size", []), (9)]);
165
- smalltalk.send(self, "_assert_equals_", [smalltalk.send("", "_size", []), (0)]);
192
+ var i=nil;
193
+ (i=(0));
194
+ (function(){while((function(){return ((($receiver = i).klass === smalltalk.Number) ? $receiver <(5) : smalltalk.send($receiver, "__lt", [(5)]));})()) {(function(){return (i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
195
+ smalltalk.send(self, "_assert_equals_", [i, (5)]);
196
+ (i=(0));
197
+ (function(){while((function(){(i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return ((($receiver = i).klass === smalltalk.Number) ? $receiver <(5) : smalltalk.send($receiver, "__lt", [(5)]));})()) {}})();
198
+ smalltalk.send(self, "_assert_equals_", [i, (5)]);
166
199
  return self;},
167
200
  args: [],
168
- source: unescape('testSize%0A%09self%20assert%3A%20%27smalltalk%27%20size%20equals%3A%209.%0A%09self%20assert%3A%20%27%27%20size%20equals%3A%200'),
169
- messageSends: ["assert:equals:", "size"],
201
+ 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",
202
+ messageSends: ["whileTrue:", "<", "+", "assert:equals:", "whileTrue"],
170
203
  referencedClasses: []
171
204
  }),
172
- smalltalk.StringTest);
205
+ smalltalk.BlockClosureTest);
173
206
 
207
+
208
+
209
+ smalltalk.addClass('BooleanTest', smalltalk.TestCase, [], 'Kernel-Tests');
174
210
  smalltalk.addMethod(
175
- unescape('_testAddRemove'),
211
+ "_testEquality",
176
212
  smalltalk.method({
177
- selector: unescape('testAddRemove'),
213
+ selector: "testEquality",
178
214
  category: 'tests',
179
- fn: function () {
215
+ fn: function (){
180
216
  var self=this;
181
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send("hello", "_add_", ["a"]);}), (smalltalk.Error || Error)]);
182
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send("hello", "_remove_", ["h"]);}), (smalltalk.Error || Error)]);
217
+ smalltalk.send(self, "_deny_", [smalltalk.send((0), "__eq", [false])]);
218
+ smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq", [(0)])]);
219
+ smalltalk.send(self, "_deny_", [smalltalk.send("", "__eq", [false])]);
220
+ smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq", [""])]);
221
+ smalltalk.send(self, "_assert_", [smalltalk.send(true, "__eq", [true])]);
222
+ smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq", [true])]);
223
+ smalltalk.send(self, "_deny_", [smalltalk.send(true, "__eq", [false])]);
224
+ smalltalk.send(self, "_assert_", [smalltalk.send(false, "__eq", [false])]);
225
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(true, "_yourself", []), "__eq", [true])]);
226
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(true, "_yourself", []), "__eq", [smalltalk.send(true, "_yourself", [])])]);
183
227
  return self;},
184
228
  args: [],
185
- source: unescape('testAddRemove%0A%09self%20should%3A%20%5B%27hello%27%20add%3A%20%27a%27%5D%20raise%3A%20Error.%0A%09self%20should%3A%20%5B%27hello%27%20remove%3A%20%27h%27%5D%20raise%3A%20Error'),
186
- messageSends: ["should:raise:", "add:", "remove:"],
187
- referencedClasses: ["Error"]
229
+ 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",
230
+ messageSends: ["deny:", "=", "assert:", "yourself"],
231
+ referencedClasses: []
188
232
  }),
189
- smalltalk.StringTest);
233
+ smalltalk.BooleanTest);
190
234
 
191
235
  smalltalk.addMethod(
192
- unescape('_testAsArray'),
236
+ "_testIdentity",
193
237
  smalltalk.method({
194
- selector: unescape('testAsArray'),
238
+ selector: "testIdentity",
195
239
  category: 'tests',
196
- fn: function () {
240
+ fn: function (){
197
241
  var self=this;
198
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_asArray", []), "__eq", [["h", "e", "l", "l", "o"]])]);
242
+ smalltalk.send(self, "_deny_", [smalltalk.send((0), "__eq_eq", [false])]);
243
+ smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq_eq", [(0)])]);
244
+ smalltalk.send(self, "_deny_", [smalltalk.send("", "__eq_eq", [false])]);
245
+ smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq_eq", [""])]);
246
+ smalltalk.send(self, "_assert_", [smalltalk.send(true, "__eq_eq", [true])]);
247
+ smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq_eq", [true])]);
248
+ smalltalk.send(self, "_deny_", [smalltalk.send(true, "__eq_eq", [false])]);
249
+ smalltalk.send(self, "_assert_", [smalltalk.send(false, "__eq_eq", [false])]);
250
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(true, "_yourself", []), "__eq_eq", [true])]);
251
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(true, "_yourself", []), "__eq_eq", [smalltalk.send(true, "_yourself", [])])]);
199
252
  return self;},
200
253
  args: [],
201
- source: unescape('testAsArray%0A%09self%20assert%3A%20%27hello%27%20asArray%20%3D%20%23%28%27h%27%20%27e%27%20%27l%27%20%27l%27%20%27o%27%29.'),
202
- messageSends: ["assert:", unescape("%3D"), "asArray"],
254
+ 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",
255
+ messageSends: ["deny:", "==", "assert:", "yourself"],
203
256
  referencedClasses: []
204
257
  }),
205
- smalltalk.StringTest);
206
-
207
-
258
+ smalltalk.BooleanTest);
208
259
 
209
- smalltalk.addClass('DictionaryTest', smalltalk.TestCase, [], 'Kernel-Tests');
210
260
  smalltalk.addMethod(
211
- unescape('_testPrintString'),
261
+ "_testIfTrueIfFalse",
212
262
  smalltalk.method({
213
- selector: unescape('testPrintString'),
263
+ selector: "testIfTrueIfFalse",
214
264
  category: 'tests',
215
- fn: function () {
265
+ fn: function (){
216
266
  var self=this;
217
- smalltalk.send(self, "_assert_equals_", [unescape("a%20Dictionary%28%27firstname%27%20-%3E%20%27James%27%20%2C%20%27lastname%27%20-%3E%20%27Bond%27%29"), (function($rec){smalltalk.send($rec, "_at_put_", ["firstname", "James"]);smalltalk.send($rec, "_at_put_", ["lastname", "Bond"]);return smalltalk.send($rec, "_printString", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []))]);
267
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = true).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "alternative block";})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return "alternative block";})])), "__eq", ["alternative block"])]);
268
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = true).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return "alternative block";})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return "alternative block";})])), "__eq", [nil])]);
269
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = false).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "alternative block";})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return "alternative block";})])), "__eq", [nil])]);
270
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = false).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return "alternative block";})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return "alternative block";})])), "__eq", ["alternative block"])]);
271
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = false).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "alternative block";})() : (function(){return "alternative block2";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "alternative block";}), (function(){return "alternative block2";})])), "__eq", ["alternative block2"])]);
272
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = false).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return "alternative block";})() : (function(){return "alternative block2";})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return "alternative block";}), (function(){return "alternative block2";})])), "__eq", ["alternative block"])]);
273
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = true).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "alternative block";})() : (function(){return "alternative block2";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "alternative block";}), (function(){return "alternative block2";})])), "__eq", ["alternative block"])]);
274
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = true).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return "alternative block";})() : (function(){return "alternative block2";})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return "alternative block";}), (function(){return "alternative block2";})])), "__eq", ["alternative block2"])]);
218
275
  return self;},
219
276
  args: [],
220
- source: unescape('testPrintString%0A%09self%0A%09%09assert%3A%20%27a%20Dictionary%28%27%27firstname%27%27%20-%3E%20%27%27James%27%27%20%2C%20%27%27lastname%27%27%20-%3E%20%27%27Bond%27%27%29%27%20%0A%09%09equals%3A%20%28Dictionary%20new%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09at%3A%27firstname%27%20put%3A%20%27James%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09at%3A%27lastname%27%20put%3A%20%27Bond%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09printString%29'),
221
- messageSends: ["assert:equals:", "at:put:", "printString", "new"],
222
- referencedClasses: ["Dictionary"]
277
+ 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'.",
278
+ messageSends: ["assert:", "=", "ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:"],
279
+ referencedClasses: []
223
280
  }),
224
- smalltalk.DictionaryTest);
281
+ smalltalk.BooleanTest);
225
282
 
226
283
  smalltalk.addMethod(
227
- unescape('_testEquality'),
284
+ "_testLogic",
228
285
  smalltalk.method({
229
- selector: unescape('testEquality'),
286
+ selector: "testLogic",
230
287
  category: 'tests',
231
- fn: function () {
288
+ fn: function (){
232
289
  var self=this;
233
- var d1=nil;
234
- var d2=nil;
235
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []), "__eq", [smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])])]);
236
- (d1=(function($rec){smalltalk.send($rec, "_at_put_", [(1), (2)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
237
- (d2=(function($rec){smalltalk.send($rec, "_at_put_", [(1), (2)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
238
- smalltalk.send(self, "_assert_", [smalltalk.send(d1, "__eq", [d2])]);
239
- (d2=(function($rec){smalltalk.send($rec, "_at_put_", [(1), (3)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
240
- smalltalk.send(self, "_deny_", [smalltalk.send(d1, "__eq", [d2])]);
241
- (d2=(function($rec){smalltalk.send($rec, "_at_put_", [(2), (2)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
242
- smalltalk.send(self, "_deny_", [smalltalk.send(d1, "__eq", [d2])]);
243
- (d2=(function($rec){smalltalk.send($rec, "_at_put_", [(1), (2)]);smalltalk.send($rec, "_at_put_", [(3), (4)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
244
- smalltalk.send(self, "_deny_", [smalltalk.send(d1, "__eq", [d2])]);
290
+ (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_&", [true])]);smalltalk.send($rec, "_deny_", [smalltalk.send(true, "_&", [false])]);smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_&", [true])]);return smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_&", [false])]);})(self);
291
+ (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_|", [true])]);smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_|", [false])]);smalltalk.send($rec, "_assert_", [smalltalk.send(false, "_|", [true])]);return smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_|", [false])]);})(self);
292
+ (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_&", [(1) > (0)])]);smalltalk.send($rec, "_deny_", [smalltalk.send((1) > (0), "_&", [false])]);return smalltalk.send($rec, "_deny_", [smalltalk.send((1) > (0), "_&", [(1) > (2)])]);})(self);
293
+ (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(false, "_|", [(1) > (0)])]);smalltalk.send($rec, "_assert_", [smalltalk.send((1) > (0), "_|", [false])]);return smalltalk.send($rec, "_assert_", [smalltalk.send((1) > (0), "_|", [(1) > (2)])]);})(self);
245
294
  return self;},
246
295
  args: [],
247
- source: unescape('testEquality%0A%09%7C%20d1%20d2%20%7C%0A%0A%09self%20assert%3A%20Dictionary%20new%20%3D%20Dictionary%20new.%0A%09%09%0A%09d1%20%3A%3D%20Dictionary%20new%20at%3A%201%20put%3A%202%3B%20yourself.%0A%09d2%20%3A%3D%20Dictionary%20new%20at%3A%201%20put%3A%202%3B%20yourself.%0A%09self%20assert%3A%20d1%20%3D%20d2.%0A%0A%09d2%20%3A%3D%20Dictionary%20new%20at%3A%201%20put%3A%203%3B%20yourself.%0A%09self%20deny%3A%20d1%20%3D%20d2.%0A%0A%09d2%20%3A%3D%20Dictionary%20new%20at%3A%202%20put%3A%202%3B%20yourself.%0A%09self%20deny%3A%20d1%20%3D%20d2.%0A%0A%09d2%20%3A%3D%20Dictionary%20new%20at%3A%201%20put%3A%202%3B%20at%3A%203%20put%3A%204%3B%20yourself.%0A%09self%20deny%3A%20d1%20%3D%20d2.'),
248
- messageSends: ["assert:", unescape("%3D"), "new", "at:put:", "yourself", "deny:"],
249
- referencedClasses: ["Dictionary"]
296
+ 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))",
297
+ messageSends: ["assert:", "&", "deny:", "|", ">"],
298
+ referencedClasses: []
250
299
  }),
251
- smalltalk.DictionaryTest);
300
+ smalltalk.BooleanTest);
252
301
 
253
302
  smalltalk.addMethod(
254
- unescape('_testDynamicDictionaries'),
303
+ "_testLogicKeywords",
255
304
  smalltalk.method({
256
- selector: unescape('testDynamicDictionaries'),
305
+ selector: "testLogicKeywords",
257
306
  category: 'tests',
258
- fn: function () {
307
+ fn: function (){
259
308
  var self=this;
260
- 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)])])])]);
309
+ (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_and_", [(function(){return true;})])]);smalltalk.send($rec, "_deny_", [smalltalk.send(true, "_and_", [(function(){return false;})])]);smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_and_", [(function(){return true;})])]);return smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_and_", [(function(){return false;})])]);})(self);
310
+ (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_or_", [(function(){return true;})])]);smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_or_", [(function(){return false;})])]);smalltalk.send($rec, "_assert_", [smalltalk.send(false, "_or_", [(function(){return true;})])]);return smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_or_", [(function(){return false;})])]);})(self);
311
+ (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_and_", [(function(){return (1) > (0);})])]);smalltalk.send($rec, "_deny_", [smalltalk.send((1) > (0), "_and_", [(function(){return false;})])]);return smalltalk.send($rec, "_deny_", [smalltalk.send((1) > (0), "_and_", [(function(){return (1) > (2);})])]);})(self);
312
+ (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(false, "_or_", [(function(){return (1) > (0);})])]);smalltalk.send($rec, "_assert_", [smalltalk.send((1) > (0), "_or_", [(function(){return false;})])]);return smalltalk.send($rec, "_assert_", [smalltalk.send((1) > (0), "_or_", [(function(){return (1) > (2);})])]);})(self);
261
313
  return self;},
262
314
  args: [],
263
- source: unescape('testDynamicDictionaries%0A%09self%20assert%3A%20%23%7B%27hello%27%20-%3E%201%7D%20asDictionary%20%3D%20%28Dictionary%20with%3A%20%27hello%27%20-%3E%201%29'),
264
- messageSends: ["assert:", unescape("%3D"), "asDictionary", unescape("-%3E"), "with:"],
265
- referencedClasses: ["Dictionary"]
315
+ 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 ])",
316
+ messageSends: ["assert:", "and:", "deny:", "or:", ">"],
317
+ referencedClasses: []
266
318
  }),
267
- smalltalk.DictionaryTest);
319
+ smalltalk.BooleanTest);
320
+
321
+
322
+
323
+ smalltalk.addClass('ClassBuilderTest', smalltalk.TestCase, ['builder', 'theClass'], 'Kernel-Tests');
324
+ smalltalk.addMethod(
325
+ "_setUp",
326
+ smalltalk.method({
327
+ selector: "setUp",
328
+ category: 'running',
329
+ fn: function (){
330
+ var self=this;
331
+ (self['@builder']=smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []));
332
+ return self;},
333
+ args: [],
334
+ source: "setUp\x0a\x09builder := ClassBuilder new",
335
+ messageSends: ["new"],
336
+ referencedClasses: ["ClassBuilder"]
337
+ }),
338
+ smalltalk.ClassBuilderTest);
339
+
340
+ smalltalk.addMethod(
341
+ "_tearDown",
342
+ smalltalk.method({
343
+ selector: "tearDown",
344
+ category: 'running',
345
+ fn: function (){
346
+ var self=this;
347
+ (($receiver = self['@theClass']) != nil && $receiver != undefined) ? (function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removeClass_", [self['@theClass']]);return (self['@theClass']=nil);})() : nil;
348
+ return self;},
349
+ args: [],
350
+ source: "tearDown\x0a\x09theClass ifNotNil: [Smalltalk current removeClass: theClass. theClass := nil]",
351
+ messageSends: ["ifNotNil:", "removeClass:", "current"],
352
+ referencedClasses: ["Smalltalk"]
353
+ }),
354
+ smalltalk.ClassBuilderTest);
355
+
356
+ smalltalk.addMethod(
357
+ "_testClassCopy",
358
+ smalltalk.method({
359
+ selector: "testClassCopy",
360
+ category: 'running',
361
+ fn: function (){
362
+ var self=this;
363
+ (self['@theClass']=smalltalk.send(self['@builder'], "_copyClass_named_", [(smalltalk.ObjectMock || ObjectMock), "ObjectMock2"]));
364
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@theClass'], "_superclass", []), "__eq_eq", [smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_superclass", [])])]);
365
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@theClass'], "_instanceVariableNames", []), "__eq_eq", [smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_instanceVariableNames", [])])]);
366
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(self['@theClass'], "_name", []), "ObjectMock2"]);
367
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@theClass'], "_package", []), "__eq_eq", [smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_package", [])])]);
368
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(self['@theClass'], "_methodDictionary", []), "_keys", []), smalltalk.send(smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_methodDictionary", []), "_keys", [])]);
369
+ return self;},
370
+ args: [],
371
+ 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",
372
+ messageSends: ["copyClass:named:", "assert:", "==", "superclass", "instanceVariableNames", "assert:equals:", "name", "package", "keys", "methodDictionary"],
373
+ referencedClasses: ["ObjectMock"]
374
+ }),
375
+ smalltalk.ClassBuilderTest);
376
+
377
+ smalltalk.addMethod(
378
+ "_testInstanceVariableNames",
379
+ smalltalk.method({
380
+ selector: "testInstanceVariableNames",
381
+ category: 'running',
382
+ fn: function (){
383
+ var self=this;
384
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(self['@builder'], "_instanceVariableNamesFor_", [" hello world "]), ["hello", "world"]]);
385
+ return self;},
386
+ args: [],
387
+ source: "testInstanceVariableNames\x0a\x09self assert: (builder instanceVariableNamesFor: ' hello world ') equals: #('hello' 'world')",
388
+ messageSends: ["assert:equals:", "instanceVariableNamesFor:"],
389
+ referencedClasses: []
390
+ }),
391
+ smalltalk.ClassBuilderTest);
268
392
 
393
+
394
+
395
+ smalltalk.addClass('DictionaryTest', smalltalk.TestCase, [], 'Kernel-Tests');
269
396
  smalltalk.addMethod(
270
- unescape('_testAccessing'),
397
+ "_testAccessing",
271
398
  smalltalk.method({
272
- selector: unescape('testAccessing'),
399
+ selector: "testAccessing",
273
400
  category: 'tests',
274
- fn: function () {
401
+ fn: function (){
275
402
  var self=this;
276
403
  var d=nil;
277
404
  (d=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
@@ -285,61 +412,61 @@ smalltalk.send(d, "_at_put_", [smalltalk.send((1), "__at", [(3)]), (3)]);
285
412
  smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_at_", [smalltalk.send((1), "__at", [(3)])]), "__eq", [(3)])]);
286
413
  return self;},
287
414
  args: [],
288
- source: unescape('testAccessing%0A%09%7C%20d%20%7C%0A%0A%09d%20%3A%3D%20Dictionary%20new.%0A%0A%09d%20at%3A%20%27hello%27%20put%3A%20%27world%27.%0A%09self%20assert%3A%20%28d%20at%3A%20%27hello%27%29%20%3D%20%27world%27.%0A%09self%20assert%3A%20%28d%20at%3A%20%27hello%27%20ifAbsent%3A%20%5Bnil%5D%29%20%3D%20%27world%27.%0A%09self%20deny%3A%20%28d%20at%3A%20%27foo%27%20ifAbsent%3A%20%5Bnil%5D%29%20%3D%20%27world%27.%0A%0A%09d%20at%3A%201%20put%3A%202.%0A%09self%20assert%3A%20%28d%20at%3A%201%29%20%3D%202.%0A%0A%09d%20at%3A%201@3%20put%3A%203.%0A%09self%20assert%3A%20%28d%20at%3A%201@3%29%20%3D%203'),
289
- messageSends: ["new", "at:put:", "assert:", unescape("%3D"), "at:", "at:ifAbsent:", "deny:", unescape("@")],
415
+ 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",
416
+ messageSends: ["new", "at:put:", "assert:", "=", "at:", "at:ifAbsent:", "deny:", "@"],
290
417
  referencedClasses: ["Dictionary"]
291
418
  }),
292
419
  smalltalk.DictionaryTest);
293
420
 
294
421
  smalltalk.addMethod(
295
- unescape('_testSize'),
422
+ "_testDynamicDictionaries",
296
423
  smalltalk.method({
297
- selector: unescape('testSize'),
424
+ selector: "testDynamicDictionaries",
298
425
  category: 'tests',
299
- fn: function () {
426
+ fn: function (){
300
427
  var self=this;
301
- var d=nil;
302
- (d=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
303
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_size", []), "__eq", [(0)])]);
304
- smalltalk.send(d, "_at_put_", [(1), (2)]);
305
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_size", []), "__eq", [(1)])]);
306
- smalltalk.send(d, "_at_put_", [(2), (3)]);
307
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_size", []), "__eq", [(2)])]);
428
+ 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)])])])]);
308
429
  return self;},
309
430
  args: [],
310
- source: unescape('testSize%0A%09%7C%20d%20%7C%0A%0A%09d%20%3A%3D%20Dictionary%20new.%0A%09self%20assert%3A%20d%20size%20%3D%200.%0A%0A%09d%20at%3A%201%20put%3A%202.%0A%09self%20assert%3A%20d%20size%20%3D%201.%0A%0A%09d%20at%3A%202%20put%3A%203.%0A%09self%20assert%3A%20d%20size%20%3D%202.'),
311
- messageSends: ["new", "assert:", unescape("%3D"), "size", "at:put:"],
431
+ source: "testDynamicDictionaries\x0a\x09self assert: #{'hello' -> 1} asDictionary = (Dictionary with: 'hello' -> 1)",
432
+ messageSends: ["assert:", "=", "asDictionary", "->", "with:"],
312
433
  referencedClasses: ["Dictionary"]
313
434
  }),
314
435
  smalltalk.DictionaryTest);
315
436
 
316
437
  smalltalk.addMethod(
317
- unescape('_testValues'),
438
+ "_testEquality",
318
439
  smalltalk.method({
319
- selector: unescape('testValues'),
440
+ selector: "testEquality",
320
441
  category: 'tests',
321
- fn: function () {
442
+ fn: function (){
322
443
  var self=this;
323
- var d=nil;
324
- (d=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
325
- smalltalk.send(d, "_at_put_", [(1), (2)]);
326
- smalltalk.send(d, "_at_put_", [(2), (3)]);
327
- smalltalk.send(d, "_at_put_", [(3), (4)]);
328
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_values", []), "__eq", [[(2), (3), (4)]])]);
444
+ var d1=nil;
445
+ var d2=nil;
446
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []), "__eq", [smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])])]);
447
+ (d1=(function($rec){smalltalk.send($rec, "_at_put_", [(1), (2)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
448
+ (d2=(function($rec){smalltalk.send($rec, "_at_put_", [(1), (2)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
449
+ smalltalk.send(self, "_assert_", [smalltalk.send(d1, "__eq", [d2])]);
450
+ (d2=(function($rec){smalltalk.send($rec, "_at_put_", [(1), (3)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
451
+ smalltalk.send(self, "_deny_", [smalltalk.send(d1, "__eq", [d2])]);
452
+ (d2=(function($rec){smalltalk.send($rec, "_at_put_", [(2), (2)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
453
+ smalltalk.send(self, "_deny_", [smalltalk.send(d1, "__eq", [d2])]);
454
+ (d2=(function($rec){smalltalk.send($rec, "_at_put_", [(1), (2)]);smalltalk.send($rec, "_at_put_", [(3), (4)]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", [])));
455
+ smalltalk.send(self, "_deny_", [smalltalk.send(d1, "__eq", [d2])]);
329
456
  return self;},
330
457
  args: [],
331
- source: unescape('testValues%0A%09%7C%20d%20%7C%0A%0A%09d%20%3A%3D%20Dictionary%20new.%0A%09d%20at%3A%201%20put%3A%202.%0A%09d%20at%3A%202%20put%3A%203.%0A%09d%20at%3A%203%20put%3A%204.%0A%0A%09self%20assert%3A%20d%20values%20%3D%20%23%282%203%204%29'),
332
- messageSends: ["new", "at:put:", "assert:", unescape("%3D"), "values"],
458
+ 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.",
459
+ messageSends: ["assert:", "=", "new", "at:put:", "yourself", "deny:"],
333
460
  referencedClasses: ["Dictionary"]
334
461
  }),
335
462
  smalltalk.DictionaryTest);
336
463
 
337
464
  smalltalk.addMethod(
338
- unescape('_testKeys'),
465
+ "_testKeys",
339
466
  smalltalk.method({
340
- selector: unescape('testKeys'),
467
+ selector: "testKeys",
341
468
  category: 'tests',
342
- fn: function () {
469
+ fn: function (){
343
470
  var self=this;
344
471
  var d=nil;
345
472
  (d=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
@@ -349,295 +476,349 @@ smalltalk.send(d, "_at_put_", [(3), (4)]);
349
476
  smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_keys", []), "__eq", [[(1), (2), (3)]])]);
350
477
  return self;},
351
478
  args: [],
352
- source: unescape('testKeys%0A%09%7C%20d%20%7C%0A%0A%09d%20%3A%3D%20Dictionary%20new.%0A%09d%20at%3A%201%20put%3A%202.%0A%09d%20at%3A%202%20put%3A%203.%0A%09d%20at%3A%203%20put%3A%204.%0A%0A%09self%20assert%3A%20d%20keys%20%3D%20%23%281%202%203%29'),
353
- messageSends: ["new", "at:put:", "assert:", unescape("%3D"), "keys"],
479
+ 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)",
480
+ messageSends: ["new", "at:put:", "assert:", "=", "keys"],
354
481
  referencedClasses: ["Dictionary"]
355
482
  }),
356
483
  smalltalk.DictionaryTest);
357
484
 
485
+ smalltalk.addMethod(
486
+ "_testPrintString",
487
+ smalltalk.method({
488
+ selector: "testPrintString",
489
+ category: 'tests',
490
+ fn: function (){
491
+ var self=this;
492
+ smalltalk.send(self, "_assert_equals_", ["a Dictionary('firstname' -> 'James' , 'lastname' -> 'Bond')", (function($rec){smalltalk.send($rec, "_at_put_", ["firstname", "James"]);smalltalk.send($rec, "_at_put_", ["lastname", "Bond"]);return smalltalk.send($rec, "_printString", []);})(smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []))]);
493
+ return self;},
494
+ args: [],
495
+ 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)",
496
+ messageSends: ["assert:equals:", "at:put:", "printString", "new"],
497
+ referencedClasses: ["Dictionary"]
498
+ }),
499
+ smalltalk.DictionaryTest);
358
500
 
359
-
360
- smalltalk.addClass('BooleanTest', smalltalk.TestCase, [], 'Kernel-Tests');
361
501
  smalltalk.addMethod(
362
- unescape('_testLogic'),
502
+ "_testRemoveKey",
363
503
  smalltalk.method({
364
- selector: unescape('testLogic'),
504
+ selector: "testRemoveKey",
365
505
  category: 'tests',
366
- fn: function () {
506
+ fn: function (){
367
507
  var self=this;
368
- (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_&", [true])]);smalltalk.send($rec, "_deny_", [smalltalk.send(true, "_&", [false])]);smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_&", [true])]);return smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_&", [false])]);})(self);
369
- (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_|", [true])]);smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_|", [false])]);smalltalk.send($rec, "_assert_", [smalltalk.send(false, "_|", [true])]);return smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_|", [false])]);})(self);
370
- (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_&", [(1) > (0)])]);smalltalk.send($rec, "_deny_", [smalltalk.send((1) > (0), "_&", [false])]);return smalltalk.send($rec, "_deny_", [smalltalk.send((1) > (0), "_&", [(1) > (2)])]);})(self);
371
- (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(false, "_|", [(1) > (0)])]);smalltalk.send($rec, "_assert_", [smalltalk.send((1) > (0), "_|", [false])]);return smalltalk.send($rec, "_assert_", [smalltalk.send((1) > (0), "_|", [(1) > (2)])]);})(self);
508
+ var d=nil;
509
+ var key=nil;
510
+ (d=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
511
+ smalltalk.send(d, "_at_put_", [(1), (2)]);
512
+ smalltalk.send(d, "_at_put_", [(2), (3)]);
513
+ smalltalk.send(d, "_at_put_", [(3), (4)]);
514
+ (key=(2));
515
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_keys", []), "__eq", [[(1), (2), (3)]])]);
516
+ smalltalk.send(d, "_removeKey_", [key]);
517
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_keys", []), "__eq", [[(1), (3)]])]);
518
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_values", []), "__eq", [[(2), (4)]])]);
519
+ smalltalk.send(self, "_deny_", [smalltalk.send(d, "_includesKey_", [(2)])]);
372
520
  return self;},
373
521
  args: [],
374
- source: unescape('testLogic%0A%20%0A%09%22Trivial%20logic%20table%22%0A%09self%20assert%3A%20%28true%20%26%20true%29%3B%20deny%3A%20%28true%20%26%20false%29%3B%20deny%3A%20%28false%20%26%20true%29%3B%20deny%3A%20%28false%20%26%20false%29.%0A%09self%20assert%3A%20%28true%20%7C%20true%29%3B%20assert%3A%20%28true%20%7C%20false%29%3B%20assert%3A%20%28false%20%7C%20true%29%3B%20deny%3A%20%28false%20%7C%20false%29.%0A%20%20%20%20%20%20%20%20%22Checking%20that%20expressions%20work%20fine%20too%22%0A%09self%20assert%3A%20%28true%20%26%20%281%20%3E%200%29%29%3B%20deny%3A%20%28%281%20%3E%200%29%20%26%20false%29%3B%20deny%3A%20%28%281%20%3E%200%29%20%26%20%281%20%3E%202%29%29.%0A%20%20%20%20%20%20%20%20self%20assert%3A%20%28false%20%7C%20%281%20%3E%200%29%29%3B%20assert%3A%20%28%281%20%3E%200%29%20%7C%20false%29%3B%20assert%3A%20%28%281%20%3E%200%29%20%7C%20%281%20%3E%202%29%29'),
375
- messageSends: ["assert:", unescape("%26"), "deny:", unescape("%7C"), unescape("%3E")],
376
- referencedClasses: []
522
+ 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)",
523
+ messageSends: ["new", "at:put:", "assert:", "=", "keys", "removeKey:", "values", "deny:", "includesKey:"],
524
+ referencedClasses: ["Dictionary"]
377
525
  }),
378
- smalltalk.BooleanTest);
526
+ smalltalk.DictionaryTest);
379
527
 
380
528
  smalltalk.addMethod(
381
- unescape('_testEquality'),
529
+ "_testRemoveKeyIfAbsent",
382
530
  smalltalk.method({
383
- selector: unescape('testEquality'),
531
+ selector: "testRemoveKeyIfAbsent",
384
532
  category: 'tests',
385
- fn: function () {
533
+ fn: function (){
386
534
  var self=this;
387
- smalltalk.send(self, "_deny_", [smalltalk.send((0), "__eq", [false])]);
388
- smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq", [(0)])]);
389
- smalltalk.send(self, "_deny_", [smalltalk.send("", "__eq", [false])]);
390
- smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq", [""])]);
391
- smalltalk.send(self, "_assert_", [smalltalk.send(true, "__eq", [true])]);
392
- smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq", [true])]);
393
- smalltalk.send(self, "_deny_", [smalltalk.send(true, "__eq", [false])]);
394
- smalltalk.send(self, "_assert_", [smalltalk.send(false, "__eq", [false])]);
395
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(true, "_yourself", []), "__eq", [true])]);
396
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(true, "_yourself", []), "__eq", [smalltalk.send(true, "_yourself", [])])]);
535
+ var d=nil;
536
+ var key=nil;
537
+ (d=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
538
+ smalltalk.send(d, "_at_put_", [(1), (2)]);
539
+ smalltalk.send(d, "_at_put_", [(2), (3)]);
540
+ smalltalk.send(d, "_at_put_", [(3), (4)]);
541
+ (key=(2));
542
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_removeKey_", [key]), "__eq", [(3)])]);
543
+ (key=(3));
544
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_removeKey_ifAbsent_", [key, (function(){return (42);})]), "__eq", [(4)])]);
545
+ (key="why");
546
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_removeKey_ifAbsent_", [key, (function(){return (42);})]), "__eq", [(42)])]);
397
547
  return self;},
398
548
  args: [],
399
- source: unescape('testEquality%0A%09%22We%27re%20on%20top%20of%20JS...just%20be%20sure%20to%20check%20the%20basics%21%22%0A%0A%09self%20deny%3A%200%20%3D%20false.%20%0A%09self%20deny%3A%20false%20%3D%200.%0A%09self%20deny%3A%20%27%27%20%3D%20false.%0A%09self%20deny%3A%20false%20%3D%20%27%27.%0A%0A%09self%20assert%3A%20true%20%3D%20true.%0A%09self%20deny%3A%20false%20%3D%20true.%0A%09self%20deny%3A%20true%20%3D%20false.%0A%09self%20assert%3A%20false%20%3D%20false.%0A%0A%09%22JS%20may%20do%20some%20type%20coercing%20after%20sending%20a%20message%22%0A%09self%20assert%3A%20true%20yourself%20%3D%20true.%0A%09self%20assert%3A%20true%20yourself%20%3D%20true%20yourself'),
400
- messageSends: ["deny:", unescape("%3D"), "assert:", "yourself"],
401
- referencedClasses: []
549
+ 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.",
550
+ messageSends: ["new", "at:put:", "assert:", "=", "removeKey:", "removeKey:ifAbsent:"],
551
+ referencedClasses: ["Dictionary"]
402
552
  }),
403
- smalltalk.BooleanTest);
553
+ smalltalk.DictionaryTest);
404
554
 
405
555
  smalltalk.addMethod(
406
- unescape('_testLogicKeywords'),
556
+ "_testSize",
407
557
  smalltalk.method({
408
- selector: unescape('testLogicKeywords'),
558
+ selector: "testSize",
409
559
  category: 'tests',
410
- fn: function () {
560
+ fn: function (){
411
561
  var self=this;
412
- (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_and_", [(function(){return true;})])]);smalltalk.send($rec, "_deny_", [smalltalk.send(true, "_and_", [(function(){return false;})])]);smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_and_", [(function(){return true;})])]);return smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_and_", [(function(){return false;})])]);})(self);
413
- (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_or_", [(function(){return true;})])]);smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_or_", [(function(){return false;})])]);smalltalk.send($rec, "_assert_", [smalltalk.send(false, "_or_", [(function(){return true;})])]);return smalltalk.send($rec, "_deny_", [smalltalk.send(false, "_or_", [(function(){return false;})])]);})(self);
414
- (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(true, "_and_", [(function(){return (1) > (0);})])]);smalltalk.send($rec, "_deny_", [smalltalk.send((1) > (0), "_and_", [(function(){return false;})])]);return smalltalk.send($rec, "_deny_", [smalltalk.send((1) > (0), "_and_", [(function(){return (1) > (2);})])]);})(self);
415
- (function($rec){smalltalk.send($rec, "_assert_", [smalltalk.send(false, "_or_", [(function(){return (1) > (0);})])]);smalltalk.send($rec, "_assert_", [smalltalk.send((1) > (0), "_or_", [(function(){return false;})])]);return smalltalk.send($rec, "_assert_", [smalltalk.send((1) > (0), "_or_", [(function(){return (1) > (2);})])]);})(self);
562
+ var d=nil;
563
+ (d=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
564
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_size", []), "__eq", [(0)])]);
565
+ smalltalk.send(d, "_at_put_", [(1), (2)]);
566
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_size", []), "__eq", [(1)])]);
567
+ smalltalk.send(d, "_at_put_", [(2), (3)]);
568
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_size", []), "__eq", [(2)])]);
416
569
  return self;},
417
570
  args: [],
418
- source: unescape('testLogicKeywords%0A%20%0A%09%22Trivial%20logic%20table%22%0A%09self%20%0A%09%09assert%3A%20%28true%20and%3A%20%5B%20true%5D%29%3B%20%0A%09%09deny%3A%20%28true%20and%3A%20%5B%20false%20%5D%29%3B%20%0A%09%09deny%3A%20%28false%20and%3A%20%5B%20true%20%5D%29%3B%20%0A%09%09deny%3A%20%28false%20and%3A%20%5B%20false%20%5D%29.%0A%09self%20%0A%09%09assert%3A%20%28true%20or%3A%20%5B%20true%20%5D%29%3B%20%0A%09%09assert%3A%20%28true%20or%3A%20%5B%20false%20%5D%29%3B%20%0A%09%09assert%3A%20%28false%20or%3A%20%5B%20true%20%5D%29%3B%20%0A%09%09deny%3A%20%28false%20or%3A%20%5B%20false%20%5D%29.%0A%20%20%20%20%20%20%20%20%0A%09%22Checking%20that%20expressions%20work%20fine%20too%22%0A%09self%20%0A%09%09assert%3A%20%28true%20and%3A%20%5B%201%20%3E%200%20%5D%29%3B%20%0A%09%09deny%3A%20%28%281%20%3E%200%29%20and%3A%20%5B%20false%20%5D%29%3B%20%0A%09%09deny%3A%20%28%281%20%3E%200%29%20and%3A%20%5B%201%20%3E%202%20%5D%29.%0A%20%20%20%20%20%20%20%20self%20%0A%09%09assert%3A%20%28false%20or%3A%20%5B%201%20%3E%200%20%5D%29%3B%20%0A%09%09assert%3A%20%28%281%20%3E%200%29%20or%3A%20%5B%20false%20%5D%29%3B%20%0A%09%09assert%3A%20%28%281%20%3E%200%29%20or%3A%20%5B%201%20%3E%202%20%5D%29'),
419
- messageSends: ["assert:", "and:", "deny:", "or:", unescape("%3E")],
420
- referencedClasses: []
571
+ 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.",
572
+ messageSends: ["new", "assert:", "=", "size", "at:put:"],
573
+ referencedClasses: ["Dictionary"]
421
574
  }),
422
- smalltalk.BooleanTest);
575
+ smalltalk.DictionaryTest);
423
576
 
424
577
  smalltalk.addMethod(
425
- unescape('_testIfTrueIfFalse'),
578
+ "_testValues",
426
579
  smalltalk.method({
427
- selector: unescape('testIfTrueIfFalse'),
580
+ selector: "testValues",
428
581
  category: 'tests',
429
- fn: function () {
582
+ fn: function (){
430
583
  var self=this;
431
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = true).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "alternative block";})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return "alternative block";})])), "__eq", ["alternative block"])]);
432
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = true).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return "alternative block";})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return "alternative block";})])), "__eq", [nil])]);
433
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = false).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "alternative block";})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return "alternative block";})])), "__eq", [nil])]);
434
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = false).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return "alternative block";})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return "alternative block";})])), "__eq", ["alternative block"])]);
435
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = false).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "alternative block";})() : (function(){return "alternative block2";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "alternative block";}), (function(){return "alternative block2";})])), "__eq", ["alternative block2"])]);
436
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = false).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return "alternative block";})() : (function(){return "alternative block2";})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return "alternative block";}), (function(){return "alternative block2";})])), "__eq", ["alternative block"])]);
437
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = true).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "alternative block";})() : (function(){return "alternative block2";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "alternative block";}), (function(){return "alternative block2";})])), "__eq", ["alternative block"])]);
438
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = true).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return "alternative block";})() : (function(){return "alternative block2";})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return "alternative block";}), (function(){return "alternative block2";})])), "__eq", ["alternative block2"])]);
584
+ var d=nil;
585
+ (d=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
586
+ smalltalk.send(d, "_at_put_", [(1), (2)]);
587
+ smalltalk.send(d, "_at_put_", [(2), (3)]);
588
+ smalltalk.send(d, "_at_put_", [(3), (4)]);
589
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(d, "_values", []), "__eq", [[(2), (3), (4)]])]);
439
590
  return self;},
440
591
  args: [],
441
- source: unescape('testIfTrueIfFalse%0A%20%0A%09self%20assert%3A%20%28true%20ifTrue%3A%20%5B%27alternative%20block%27%5D%29%20%3D%20%27alternative%20block%27.%0A%09self%20assert%3A%20%28true%20ifFalse%3A%20%5B%27alternative%20block%27%5D%29%20%3D%20nil.%0A%0A%09self%20assert%3A%20%28false%20ifTrue%3A%20%5B%27alternative%20block%27%5D%29%20%3D%20nil.%0A%09self%20assert%3A%20%28false%20ifFalse%3A%20%5B%27alternative%20block%27%5D%29%20%3D%20%27alternative%20block%27.%0A%0A%09self%20assert%3A%20%28false%20ifTrue%3A%20%5B%27alternative%20block%27%5D%20ifFalse%3A%20%5B%27alternative%20block2%27%5D%29%20%3D%20%27alternative%20block2%27.%0A%09self%20assert%3A%20%28false%20ifFalse%3A%20%5B%27alternative%20block%27%5D%20ifTrue%3A%20%5B%27alternative%20block2%27%5D%29%20%3D%20%27alternative%20block%27.%0A%0A%09self%20assert%3A%20%28true%20ifTrue%3A%20%5B%27alternative%20block%27%5D%20ifFalse%3A%20%5B%27alternative%20block2%27%5D%29%20%3D%20%27alternative%20block%27.%0A%09self%20assert%3A%20%28true%20ifFalse%3A%20%5B%27alternative%20block%27%5D%20ifTrue%3A%20%5B%27alternative%20block2%27%5D%29%20%3D%20%27alternative%20block2%27.'),
442
- messageSends: ["assert:", unescape("%3D"), "ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:"],
443
- referencedClasses: []
592
+ 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)",
593
+ messageSends: ["new", "at:put:", "assert:", "=", "values"],
594
+ referencedClasses: ["Dictionary"]
444
595
  }),
445
- smalltalk.BooleanTest);
596
+ smalltalk.DictionaryTest);
446
597
 
447
598
 
448
599
 
449
- smalltalk.addClass('NumberTest', smalltalk.TestCase, [], 'Kernel-Tests');
600
+ smalltalk.addClass('JSObjectProxyTest', smalltalk.TestCase, [], 'Kernel-Tests');
601
+ smalltalk.addMethod(
602
+ "_jsObject",
603
+ smalltalk.method({
604
+ selector: "jsObject",
605
+ category: 'accessing',
606
+ fn: function (){
607
+ var self=this;
608
+ return jsObject = {a: 1, b: function() {return 2;}, c: function(object) {return object;}};
609
+ return self;},
610
+ args: [],
611
+ source: "jsObject\x0a\x09<return jsObject = {a: 1, b: function() {return 2;}, c: function(object) {return object;}}>",
612
+ messageSends: [],
613
+ referencedClasses: []
614
+ }),
615
+ smalltalk.JSObjectProxyTest);
616
+
450
617
  smalltalk.addMethod(
451
- unescape('_testPrintShowingDecimalPlaces'),
618
+ "_testDNU",
452
619
  smalltalk.method({
453
- selector: unescape('testPrintShowingDecimalPlaces'),
620
+ selector: "testDNU",
454
621
  category: 'tests',
455
- fn: function () {
622
+ fn: function (){
456
623
  var self=this;
457
- smalltalk.send(self, "_assert_equals_", ["23.00", smalltalk.send((23), "_printShowingDecimalPlaces_", [(2)])]);
458
- smalltalk.send(self, "_assert_equals_", ["23.57", smalltalk.send((23.5698), "_printShowingDecimalPlaces_", [(2)])]);
459
- smalltalk.send(self, "_assert_equals_", [unescape("-234.56700"), smalltalk.send(smalltalk.send((234.567), "_negated", []), "_printShowingDecimalPlaces_", [(5)])]);
460
- smalltalk.send(self, "_assert_equals_", ["23", smalltalk.send((23.4567), "_printShowingDecimalPlaces_", [(0)])]);
461
- smalltalk.send(self, "_assert_equals_", ["24", smalltalk.send((23.5567), "_printShowingDecimalPlaces_", [(0)])]);
462
- smalltalk.send(self, "_assert_equals_", [unescape("-23"), smalltalk.send(smalltalk.send((23.4567), "_negated", []), "_printShowingDecimalPlaces_", [(0)])]);
463
- smalltalk.send(self, "_assert_equals_", [unescape("-24"), smalltalk.send(smalltalk.send((23.5567), "_negated", []), "_printShowingDecimalPlaces_", [(0)])]);
464
- smalltalk.send(self, "_assert_equals_", ["100000000.0", smalltalk.send((100000000), "_printShowingDecimalPlaces_", [(1)])]);
465
- smalltalk.send(self, "_assert_equals_", ["0.98000", smalltalk.send((0.98), "_printShowingDecimalPlaces_", [(5)])]);
466
- smalltalk.send(self, "_assert_equals_", [unescape("-0.98"), smalltalk.send(smalltalk.send((0.98), "_negated", []), "_printShowingDecimalPlaces_", [(2)])]);
467
- smalltalk.send(self, "_assert_equals_", ["2.57", smalltalk.send((2.567), "_printShowingDecimalPlaces_", [(2)])]);
468
- smalltalk.send(self, "_assert_equals_", [unescape("-2.57"), smalltalk.send((-2.567), "_printShowingDecimalPlaces_", [(2)])]);
469
- smalltalk.send(self, "_assert_equals_", ["0.00", smalltalk.send((0), "_printShowingDecimalPlaces_", [(2)])]);
624
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_foo", []);}), (smalltalk.MessageNotUnderstood || MessageNotUnderstood)]);
470
625
  return self;},
471
626
  args: [],
472
- source: unescape('testPrintShowingDecimalPlaces%0A%09self%20assert%3A%20%2723.00%27%20equals%3A%20%2823%20printShowingDecimalPlaces%3A%202%29.%0A%09self%20assert%3A%20%2723.57%27%20equals%3A%20%2823.5698%20printShowingDecimalPlaces%3A%202%29.%0A%09self%20assert%3A%20%27-234.56700%27%20equals%3A%28%20234.567%20negated%20printShowingDecimalPlaces%3A%205%29.%0A%09self%20assert%3A%20%2723%27%20equals%3A%20%2823.4567%20printShowingDecimalPlaces%3A%200%29.%0A%09self%20assert%3A%20%2724%27%20equals%3A%20%2823.5567%20printShowingDecimalPlaces%3A%200%29.%0A%09self%20assert%3A%20%27-23%27%20equals%3A%20%2823.4567%20negated%20printShowingDecimalPlaces%3A%200%29.%0A%09self%20assert%3A%20%27-24%27%20equals%3A%20%2823.5567%20negated%20printShowingDecimalPlaces%3A%200%29.%0A%09self%20assert%3A%20%27100000000.0%27%20equals%3A%20%28100000000%20printShowingDecimalPlaces%3A%201%29.%0A%09self%20assert%3A%20%270.98000%27%20equals%3A%20%280.98%20printShowingDecimalPlaces%3A%205%29.%0A%09self%20assert%3A%20%27-0.98%27%20equals%3A%20%280.98%20negated%20printShowingDecimalPlaces%3A%202%29.%0A%09self%20assert%3A%20%272.57%27%20equals%3A%20%282.567%20printShowingDecimalPlaces%3A%202%29.%0A%09self%20assert%3A%20%27-2.57%27%20equals%3A%20%28-2.567%20printShowingDecimalPlaces%3A%202%29.%0A%09self%20assert%3A%20%270.00%27%20equals%3A%20%280%20printShowingDecimalPlaces%3A%202%29.'),
473
- messageSends: ["assert:equals:", "printShowingDecimalPlaces:", "negated"],
627
+ source: "testDNU\x0a\x09self should: [self jsObject foo] raise: MessageNotUnderstood",
628
+ messageSends: ["should:raise:", "foo", "jsObject"],
629
+ referencedClasses: ["MessageNotUnderstood"]
630
+ }),
631
+ smalltalk.JSObjectProxyTest);
632
+
633
+ smalltalk.addMethod(
634
+ "_testMessageSend",
635
+ smalltalk.method({
636
+ selector: "testMessageSend",
637
+ category: 'tests',
638
+ fn: function (){
639
+ var self=this;
640
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(self, "_jsObject", []), "_a", []), (1)]);
641
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(self, "_jsObject", []), "_b", []), (2)]);
642
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(self, "_jsObject", []), "_c_", [(3)]), (3)]);
643
+ return self;},
644
+ args: [],
645
+ 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",
646
+ messageSends: ["assert:equals:", "a", "jsObject", "b", "c:"],
474
647
  referencedClasses: []
475
648
  }),
476
- smalltalk.NumberTest);
649
+ smalltalk.JSObjectProxyTest);
477
650
 
478
651
  smalltalk.addMethod(
479
- unescape('_testEquality'),
652
+ "_testMethodWithArguments",
480
653
  smalltalk.method({
481
- selector: unescape('testEquality'),
654
+ selector: "testMethodWithArguments",
482
655
  category: 'tests',
483
- fn: function () {
656
+ fn: function (){
484
657
  var self=this;
485
- smalltalk.send(self, "_assert_", [smalltalk.send((1), "__eq", [(1)])]);
486
- smalltalk.send(self, "_assert_", [smalltalk.send((0), "__eq", [(0)])]);
487
- smalltalk.send(self, "_deny_", [smalltalk.send((1), "__eq", [(0)])]);
488
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "_yourself", []), "__eq", [(1)])]);
489
- smalltalk.send(self, "_assert_", [smalltalk.send((1), "__eq", [smalltalk.send((1), "_yourself", [])])]);
490
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "_yourself", []), "__eq", [smalltalk.send((1), "_yourself", [])])]);
491
- smalltalk.send(self, "_deny_", [smalltalk.send((0), "__eq", [false])]);
492
- smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq", [(0)])]);
493
- smalltalk.send(self, "_deny_", [smalltalk.send("", "__eq", [(0)])]);
494
- smalltalk.send(self, "_deny_", [smalltalk.send((0), "__eq", [""])]);
658
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_hasClass_", ["amber"])]);
659
+ smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amber"]);
660
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_hasClass_", ["amber"])]);
661
+ smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["amber"]);
662
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_hasClass_", ["amber"])]);
495
663
  return self;},
496
664
  args: [],
497
- source: unescape('testEquality%0A%09self%20assert%3A%201%20%3D%201.%0A%09self%20assert%3A%200%20%3D%200.%0A%09self%20deny%3A%201%20%3D%200.%0A%0A%09self%20assert%3A%201%20yourself%20%3D%201.%0A%09self%20assert%3A%201%20%3D%201%20yourself.%0A%09self%20assert%3A%201%20yourself%20%3D%201%20yourself.%0A%09%0A%09self%20deny%3A%200%20%3D%20false.%0A%09self%20deny%3A%20false%20%3D%200.%0A%09self%20deny%3A%20%27%27%20%3D%200.%0A%09self%20deny%3A%200%20%3D%20%27%27'),
498
- messageSends: ["assert:", unescape("%3D"), "deny:", "yourself"],
665
+ source: "testMethodWithArguments\x0a\x09self deny: ('body' asJQuery hasClass: 'amber').\x0a\x0a\x09'body' asJQuery addClass: 'amber'.\x0a\x09self assert: ('body' asJQuery hasClass: 'amber').\x0a\x0a\x09'body' asJQuery removeClass: 'amber'.\x0a\x09self deny: ('body' asJQuery hasClass: 'amber').",
666
+ messageSends: ["deny:", "hasClass:", "asJQuery", "addClass:", "assert:", "removeClass:"],
499
667
  referencedClasses: []
500
668
  }),
501
- smalltalk.NumberTest);
669
+ smalltalk.JSObjectProxyTest);
502
670
 
503
671
  smalltalk.addMethod(
504
- unescape('_testArithmetic'),
672
+ "_testPrinting",
505
673
  smalltalk.method({
506
- selector: unescape('testArithmetic'),
674
+ selector: "testPrinting",
507
675
  category: 'tests',
508
- fn: function () {
676
+ fn: function (){
509
677
  var self=this;
510
- smalltalk.send(self, "_assert_", [smalltalk.send((1.5) + (1), "__eq", [(2.5)])]);
511
- smalltalk.send(self, "_assert_", [smalltalk.send((2) - (1), "__eq", [(1)])]);
512
- smalltalk.send(self, "_assert_", [smalltalk.send((-2) - (1), "__eq", [(-3)])]);
513
- smalltalk.send(self, "_assert_", [smalltalk.send((12) / (2), "__eq", [(6)])]);
514
- smalltalk.send(self, "_assert_", [smalltalk.send((3) * (4), "__eq", [(12)])]);
515
- smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = (1) + (2)).klass === smalltalk.Number) ? $receiver *(3) : smalltalk.send($receiver, "__star", [(3)])), "__eq", [(9)])]);
516
- smalltalk.send(self, "_assert_", [smalltalk.send((1) + (2) * (3), "__eq", [(7)])]);
678
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_jsObject", []), "_printString", []), "__eq", ["[object Object]"])]);
517
679
  return self;},
518
680
  args: [],
519
- source: unescape('testArithmetic%0A%09%0A%09%22We%20rely%20on%20JS%20here%2C%20so%20we%20won%27t%20test%20complex%20behavior%2C%20just%20check%20if%20%0A%09message%20sends%20are%20corrects%22%0A%0A%09self%20assert%3A%201.5%20+%201%20%3D%202.5.%0A%09self%20assert%3A%202%20-%201%20%3D%201.%0A%09self%20assert%3A%20-2%20-%201%20%3D%20-3.%0A%09self%20assert%3A%2012%20/%202%20%3D%206.%0A%09self%20assert%3A%203%20*%204%20%3D%2012.%0A%0A%09%22Simple%20parenthesis%20and%20execution%20order%22%0A%0A%09self%20assert%3A%201%20+%202%20*%203%20%3D%209.%0A%09self%20assert%3A%201%20+%20%282%20*%203%29%20%3D%207'),
520
- messageSends: ["assert:", unescape("%3D"), unescape("+"), unescape("-"), unescape("/"), unescape("*")],
681
+ source: "testPrinting\x0a\x09self assert: self jsObject printString = '[object Object]'",
682
+ messageSends: ["assert:", "=", "printString", "jsObject"],
521
683
  referencedClasses: []
522
684
  }),
523
- smalltalk.NumberTest);
685
+ smalltalk.JSObjectProxyTest);
524
686
 
525
687
  smalltalk.addMethod(
526
- unescape('_testRounded'),
688
+ "_testPropertyThatReturnsEmptyString",
527
689
  smalltalk.method({
528
- selector: unescape('testRounded'),
690
+ selector: "testPropertyThatReturnsEmptyString",
529
691
  category: 'tests',
530
- fn: function () {
692
+ fn: function (){
531
693
  var self=this;
532
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3), "_rounded", []), "__eq", [(3)])]);
533
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3.212), "_rounded", []), "__eq", [(3)])]);
534
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3.51), "_rounded", []), "__eq", [(4)])]);
694
+ document.location.hash = '';
695
+ smalltalk.send(self, "_assert_equals_", ["", smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash", [])]);
696
+ smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash_", ["test"]);
697
+ smalltalk.send(self, "_assert_equals_", ["#test", smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash", [])]);
535
698
  return self;},
536
699
  args: [],
537
- source: unescape('testRounded%0A%09%0A%09self%20assert%3A%203%20rounded%20%3D%203.%0A%09self%20assert%3A%203.212%20rounded%20%3D%203.%0A%09self%20assert%3A%203.51%20rounded%20%3D%204'),
538
- messageSends: ["assert:", unescape("%3D"), "rounded"],
700
+ source: "testPropertyThatReturnsEmptyString\x0a\x09<document.location.hash = ''>.\x0a\x09self assert: '' equals: document location hash.\x0a\x0a\x09document location hash: 'test'.\x0a\x09self assert: '#test' equals: document location hash.",
701
+ messageSends: ["assert:equals:", "hash", "location", "hash:"],
539
702
  referencedClasses: []
540
703
  }),
541
- smalltalk.NumberTest);
704
+ smalltalk.JSObjectProxyTest);
542
705
 
543
706
  smalltalk.addMethod(
544
- unescape('_testNegated'),
707
+ "_testYourself",
545
708
  smalltalk.method({
546
- selector: unescape('testNegated'),
709
+ selector: "testYourself",
547
710
  category: 'tests',
548
- fn: function () {
711
+ fn: function (){
549
712
  var self=this;
550
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3), "_negated", []), "__eq", [(-3)])]);
551
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((-3), "_negated", []), "__eq", [(3)])]);
713
+ var body=nil;
714
+ (body=(function($rec){smalltalk.send($rec, "_addClass_", ["amber"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send("body", "_asJQuery", [])));
715
+ smalltalk.send(self, "_assert_", [smalltalk.send(body, "_hasClass_", ["amber"])]);
716
+ smalltalk.send(body, "_removeClass_", ["amber"]);
717
+ smalltalk.send(self, "_deny_", [smalltalk.send(body, "_hasClass_", ["amber"])]);
552
718
  return self;},
553
719
  args: [],
554
- source: unescape('testNegated%0A%09self%20assert%3A%203%20negated%20%3D%20-3.%0A%09self%20assert%3A%20-3%20negated%20%3D%203'),
555
- messageSends: ["assert:", unescape("%3D"), "negated"],
720
+ source: "testYourself\x0a\x09|body|\x0a\x09body := 'body' asJQuery\x0a\x09\x09\x09\x09addClass: 'amber';\x0a\x09\x09\x09\x09yourself.\x0a\x0a\x09self assert: (body hasClass: 'amber').\x0a\x0a\x09body removeClass: 'amber'.\x0a\x09self deny: (body hasClass: 'amber').",
721
+ messageSends: ["addClass:", "yourself", "asJQuery", "assert:", "hasClass:", "removeClass:", "deny:"],
556
722
  referencedClasses: []
557
723
  }),
558
- smalltalk.NumberTest);
724
+ smalltalk.JSObjectProxyTest);
725
+
726
+
559
727
 
728
+ smalltalk.addClass('NumberTest', smalltalk.TestCase, [], 'Kernel-Tests');
560
729
  smalltalk.addMethod(
561
- unescape('_testComparison'),
730
+ "_testArithmetic",
562
731
  smalltalk.method({
563
- selector: unescape('testComparison'),
732
+ selector: "testArithmetic",
564
733
  category: 'tests',
565
- fn: function () {
734
+ fn: function (){
566
735
  var self=this;
567
- smalltalk.send(self, "_assert_", [(3) > (2)]);
568
- smalltalk.send(self, "_assert_", [(2) < (3)]);
569
- smalltalk.send(self, "_deny_", [(3) < (2)]);
570
- smalltalk.send(self, "_deny_", [(2) > (3)]);
571
- smalltalk.send(self, "_assert_", [(3) >= (3)]);
572
- smalltalk.send(self, "_assert_", [(3.1) >= (3)]);
573
- smalltalk.send(self, "_assert_", [(3) <= (3)]);
574
- smalltalk.send(self, "_assert_", [(3) <= (3.1)]);
736
+ smalltalk.send(self, "_assert_", [smalltalk.send((1.5) + (1), "__eq", [(2.5)])]);
737
+ smalltalk.send(self, "_assert_", [smalltalk.send((2) - (1), "__eq", [(1)])]);
738
+ smalltalk.send(self, "_assert_", [smalltalk.send((-2) - (1), "__eq", [(-3)])]);
739
+ smalltalk.send(self, "_assert_", [smalltalk.send((12) / (2), "__eq", [(6)])]);
740
+ smalltalk.send(self, "_assert_", [smalltalk.send((3) * (4), "__eq", [(12)])]);
741
+ smalltalk.send(self, "_assert_", [smalltalk.send(((($receiver = (1) + (2)).klass === smalltalk.Number) ? $receiver *(3) : smalltalk.send($receiver, "__star", [(3)])), "__eq", [(9)])]);
742
+ smalltalk.send(self, "_assert_", [smalltalk.send((1) + (2) * (3), "__eq", [(7)])]);
575
743
  return self;},
576
744
  args: [],
577
- source: unescape('testComparison%0A%0A%09self%20assert%3A%203%20%3E%202.%0A%09self%20assert%3A%202%20%3C%203.%0A%09%0A%09self%20deny%3A%203%20%3C%202.%0A%09self%20deny%3A%202%20%3E%203.%0A%0A%09self%20assert%3A%203%20%3E%3D%203.%0A%09self%20assert%3A%203.1%20%3E%3D%203.%0A%09self%20assert%3A%203%20%3C%3D%203.%0A%09self%20assert%3A%203%20%3C%3D%203.1'),
578
- messageSends: ["assert:", unescape("%3E"), unescape("%3C"), "deny:", unescape("%3E%3D"), unescape("%3C%3D")],
745
+ 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",
746
+ messageSends: ["assert:", "=", "+", "-", "/", "*"],
579
747
  referencedClasses: []
580
748
  }),
581
749
  smalltalk.NumberTest);
582
750
 
583
751
  smalltalk.addMethod(
584
- unescape('_testTruncated'),
752
+ "_testComparison",
585
753
  smalltalk.method({
586
- selector: unescape('testTruncated'),
754
+ selector: "testComparison",
587
755
  category: 'tests',
588
- fn: function () {
756
+ fn: function (){
589
757
  var self=this;
590
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3), "_truncated", []), "__eq", [(3)])]);
591
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3.212), "_truncated", []), "__eq", [(3)])]);
592
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3.51), "_truncated", []), "__eq", [(3)])]);
758
+ smalltalk.send(self, "_assert_", [(3) > (2)]);
759
+ smalltalk.send(self, "_assert_", [(2) < (3)]);
760
+ smalltalk.send(self, "_deny_", [(3) < (2)]);
761
+ smalltalk.send(self, "_deny_", [(2) > (3)]);
762
+ smalltalk.send(self, "_assert_", [(3) >= (3)]);
763
+ smalltalk.send(self, "_assert_", [(3.1) >= (3)]);
764
+ smalltalk.send(self, "_assert_", [(3) <= (3)]);
765
+ smalltalk.send(self, "_assert_", [(3) <= (3.1)]);
593
766
  return self;},
594
767
  args: [],
595
- source: unescape('testTruncated%0A%09%0A%09self%20assert%3A%203%20truncated%20%3D%203.%0A%09self%20assert%3A%203.212%20truncated%20%3D%203.%0A%09self%20assert%3A%203.51%20truncated%20%3D%203'),
596
- messageSends: ["assert:", unescape("%3D"), "truncated"],
768
+ 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",
769
+ messageSends: ["assert:", ">", "<", "deny:", ">=", "<="],
597
770
  referencedClasses: []
598
771
  }),
599
772
  smalltalk.NumberTest);
600
773
 
601
774
  smalltalk.addMethod(
602
- unescape('_testCopying'),
775
+ "_testCopying",
603
776
  smalltalk.method({
604
- selector: unescape('testCopying'),
777
+ selector: "testCopying",
605
778
  category: 'tests',
606
- fn: function () {
779
+ fn: function (){
607
780
  var self=this;
608
781
  smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "_copy", []), "__eq_eq", [(1)])]);
609
782
  smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "_deepCopy", []), "__eq_eq", [(1)])]);
610
783
  return self;},
611
784
  args: [],
612
- source: unescape('testCopying%0A%09self%20assert%3A%201%20copy%20%3D%3D%201.%0A%09self%20assert%3A%201%20deepCopy%20%3D%3D%201'),
613
- messageSends: ["assert:", unescape("%3D%3D"), "copy", "deepCopy"],
785
+ source: "testCopying\x0a\x09self assert: 1 copy == 1.\x0a\x09self assert: 1 deepCopy == 1",
786
+ messageSends: ["assert:", "==", "copy", "deepCopy"],
614
787
  referencedClasses: []
615
788
  }),
616
789
  smalltalk.NumberTest);
617
790
 
618
791
  smalltalk.addMethod(
619
- unescape('_testMinMax'),
792
+ "_testEquality",
620
793
  smalltalk.method({
621
- selector: unescape('testMinMax'),
794
+ selector: "testEquality",
622
795
  category: 'tests',
623
- fn: function () {
796
+ fn: function (){
624
797
  var self=this;
625
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((2), "_max_", [(5)]), (5)]);
626
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((2), "_min_", [(5)]), (2)]);
798
+ smalltalk.send(self, "_assert_", [smalltalk.send((1), "__eq", [(1)])]);
799
+ smalltalk.send(self, "_assert_", [smalltalk.send((0), "__eq", [(0)])]);
800
+ smalltalk.send(self, "_deny_", [smalltalk.send((1), "__eq", [(0)])]);
801
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "_yourself", []), "__eq", [(1)])]);
802
+ smalltalk.send(self, "_assert_", [smalltalk.send((1), "__eq", [smalltalk.send((1), "_yourself", [])])]);
803
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "_yourself", []), "__eq", [smalltalk.send((1), "_yourself", [])])]);
804
+ smalltalk.send(self, "_deny_", [smalltalk.send((0), "__eq", [false])]);
805
+ smalltalk.send(self, "_deny_", [smalltalk.send(false, "__eq", [(0)])]);
806
+ smalltalk.send(self, "_deny_", [smalltalk.send("", "__eq", [(0)])]);
807
+ smalltalk.send(self, "_deny_", [smalltalk.send((0), "__eq", [""])]);
627
808
  return self;},
628
809
  args: [],
629
- source: unescape('testMinMax%0A%09%0A%09self%20assert%3A%20%282%20max%3A%205%29%20equals%3A%205.%0A%09self%20assert%3A%20%282%20min%3A%205%29%20equals%3A%202'),
630
- messageSends: ["assert:equals:", "max:", "min:"],
810
+ 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 = ''",
811
+ messageSends: ["assert:", "=", "deny:", "yourself"],
631
812
  referencedClasses: []
632
813
  }),
633
814
  smalltalk.NumberTest);
634
815
 
635
816
  smalltalk.addMethod(
636
- unescape('_testIdentity'),
817
+ "_testIdentity",
637
818
  smalltalk.method({
638
- selector: unescape('testIdentity'),
819
+ selector: "testIdentity",
639
820
  category: 'tests',
640
- fn: function () {
821
+ fn: function (){
641
822
  var self=this;
642
823
  smalltalk.send(self, "_assert_", [smalltalk.send((1), "__eq_eq", [(1)])]);
643
824
  smalltalk.send(self, "_assert_", [smalltalk.send((0), "__eq_eq", [(0)])]);
@@ -648,1352 +829,1295 @@ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "_yourself"
648
829
  smalltalk.send(self, "_deny_", [smalltalk.send((1), "__eq_eq", [(2)])]);
649
830
  return self;},
650
831
  args: [],
651
- source: unescape('testIdentity%0A%09self%20assert%3A%201%20%3D%3D%201.%0A%09self%20assert%3A%200%20%3D%3D%200.%0A%09self%20deny%3A%201%20%3D%3D%200.%0A%0A%09self%20assert%3A%201%20yourself%20%3D%3D%201.%0A%09self%20assert%3A%201%20%3D%3D%201%20yourself.%0A%09self%20assert%3A%201%20yourself%20%3D%3D%201%20yourself.%0A%09%0A%09self%20deny%3A%201%20%3D%3D%202'),
652
- messageSends: ["assert:", unescape("%3D%3D"), "deny:", "yourself"],
832
+ 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",
833
+ messageSends: ["assert:", "==", "deny:", "yourself"],
653
834
  referencedClasses: []
654
835
  }),
655
836
  smalltalk.NumberTest);
656
837
 
657
838
  smalltalk.addMethod(
658
- unescape('_testSqrt'),
839
+ "_testMinMax",
659
840
  smalltalk.method({
660
- selector: unescape('testSqrt'),
841
+ selector: "testMinMax",
661
842
  category: 'tests',
662
- fn: function () {
843
+ fn: function (){
663
844
  var self=this;
664
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((4), "_sqrt", []), "__eq", [(2)])]);
665
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((16), "_sqrt", []), "__eq", [(4)])]);
845
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((2), "_max_", [(5)]), (5)]);
846
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((2), "_min_", [(5)]), (2)]);
666
847
  return self;},
667
848
  args: [],
668
- source: unescape('testSqrt%0A%09%0A%09self%20assert%3A%204%20sqrt%20%3D%202.%0A%09self%20assert%3A%2016%20sqrt%20%3D%204'),
669
- messageSends: ["assert:", unescape("%3D"), "sqrt"],
849
+ source: "testMinMax\x0a\x09\x0a\x09self assert: (2 max: 5) equals: 5.\x0a\x09self assert: (2 min: 5) equals: 2",
850
+ messageSends: ["assert:equals:", "max:", "min:"],
670
851
  referencedClasses: []
671
852
  }),
672
853
  smalltalk.NumberTest);
673
854
 
674
855
  smalltalk.addMethod(
675
- unescape('_testSquared'),
856
+ "_testNegated",
676
857
  smalltalk.method({
677
- selector: unescape('testSquared'),
858
+ selector: "testNegated",
678
859
  category: 'tests',
679
- fn: function () {
860
+ fn: function (){
680
861
  var self=this;
681
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((4), "_squared", []), "__eq", [(16)])]);
862
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3), "_negated", []), "__eq", [(-3)])]);
863
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((-3), "_negated", []), "__eq", [(3)])]);
682
864
  return self;},
683
865
  args: [],
684
- source: unescape('testSquared%0A%09%0A%09self%20assert%3A%204%20squared%20%3D%2016'),
685
- messageSends: ["assert:", unescape("%3D"), "squared"],
866
+ source: "testNegated\x0a\x09self assert: 3 negated = -3.\x0a\x09self assert: -3 negated = 3",
867
+ messageSends: ["assert:", "=", "negated"],
686
868
  referencedClasses: []
687
869
  }),
688
870
  smalltalk.NumberTest);
689
871
 
690
872
  smalltalk.addMethod(
691
- unescape('_testTimesRepeat'),
873
+ "_testPrintShowingDecimalPlaces",
692
874
  smalltalk.method({
693
- selector: unescape('testTimesRepeat'),
875
+ selector: "testPrintShowingDecimalPlaces",
694
876
  category: 'tests',
695
- fn: function () {
877
+ fn: function (){
696
878
  var self=this;
697
- var i=nil;
698
- (i=(0));
699
- smalltalk.send((0), "_timesRepeat_", [(function(){return (i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})]);
700
- smalltalk.send(self, "_assert_equals_", [i, (0)]);
701
- smalltalk.send((5), "_timesRepeat_", [(function(){return (i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})]);
702
- smalltalk.send(self, "_assert_equals_", [i, (5)]);
879
+ smalltalk.send(self, "_assert_equals_", ["23.00", smalltalk.send((23), "_printShowingDecimalPlaces_", [(2)])]);
880
+ smalltalk.send(self, "_assert_equals_", ["23.57", smalltalk.send((23.5698), "_printShowingDecimalPlaces_", [(2)])]);
881
+ smalltalk.send(self, "_assert_equals_", ["-234.56700", smalltalk.send(smalltalk.send((234.567), "_negated", []), "_printShowingDecimalPlaces_", [(5)])]);
882
+ smalltalk.send(self, "_assert_equals_", ["23", smalltalk.send((23.4567), "_printShowingDecimalPlaces_", [(0)])]);
883
+ smalltalk.send(self, "_assert_equals_", ["24", smalltalk.send((23.5567), "_printShowingDecimalPlaces_", [(0)])]);
884
+ smalltalk.send(self, "_assert_equals_", ["-23", smalltalk.send(smalltalk.send((23.4567), "_negated", []), "_printShowingDecimalPlaces_", [(0)])]);
885
+ smalltalk.send(self, "_assert_equals_", ["-24", smalltalk.send(smalltalk.send((23.5567), "_negated", []), "_printShowingDecimalPlaces_", [(0)])]);
886
+ smalltalk.send(self, "_assert_equals_", ["100000000.0", smalltalk.send((100000000), "_printShowingDecimalPlaces_", [(1)])]);
887
+ smalltalk.send(self, "_assert_equals_", ["0.98000", smalltalk.send((0.98), "_printShowingDecimalPlaces_", [(5)])]);
888
+ smalltalk.send(self, "_assert_equals_", ["-0.98", smalltalk.send(smalltalk.send((0.98), "_negated", []), "_printShowingDecimalPlaces_", [(2)])]);
889
+ smalltalk.send(self, "_assert_equals_", ["2.57", smalltalk.send((2.567), "_printShowingDecimalPlaces_", [(2)])]);
890
+ smalltalk.send(self, "_assert_equals_", ["-2.57", smalltalk.send((-2.567), "_printShowingDecimalPlaces_", [(2)])]);
891
+ smalltalk.send(self, "_assert_equals_", ["0.00", smalltalk.send((0), "_printShowingDecimalPlaces_", [(2)])]);
703
892
  return self;},
704
893
  args: [],
705
- source: unescape('testTimesRepeat%0A%09%7C%20i%20%7C%0A%0A%09i%20%3A%3D%200.%0A%090%20timesRepeat%3A%20%5Bi%20%3A%3D%20i%20+%201%5D.%0A%09self%20assert%3A%20i%20equals%3A%200.%0A%0A%095%20timesRepeat%3A%20%5Bi%20%3A%3D%20i%20+%201%5D.%0A%09self%20assert%3A%20i%20equals%3A%205'),
706
- messageSends: ["timesRepeat:", unescape("+"), "assert:equals:"],
894
+ 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).",
895
+ messageSends: ["assert:equals:", "printShowingDecimalPlaces:", "negated"],
707
896
  referencedClasses: []
708
897
  }),
709
898
  smalltalk.NumberTest);
710
899
 
711
900
  smalltalk.addMethod(
712
- unescape('_testTo'),
901
+ "_testRounded",
713
902
  smalltalk.method({
714
- selector: unescape('testTo'),
903
+ selector: "testRounded",
715
904
  category: 'tests',
716
- fn: function () {
905
+ fn: function (){
717
906
  var self=this;
718
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((1), "_to_", [(5)]), [(1), (2), (3), (4), (5)]]);
907
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3), "_rounded", []), "__eq", [(3)])]);
908
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3.212), "_rounded", []), "__eq", [(3)])]);
909
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3.51), "_rounded", []), "__eq", [(4)])]);
719
910
  return self;},
720
911
  args: [],
721
- source: unescape('testTo%0A%09self%20assert%3A%20%281%20to%3A%205%29%20equals%3A%20%23%281%202%203%204%205%29'),
722
- messageSends: ["assert:equals:", "to:"],
912
+ source: "testRounded\x0a\x09\x0a\x09self assert: 3 rounded = 3.\x0a\x09self assert: 3.212 rounded = 3.\x0a\x09self assert: 3.51 rounded = 4",
913
+ messageSends: ["assert:", "=", "rounded"],
723
914
  referencedClasses: []
724
915
  }),
725
916
  smalltalk.NumberTest);
726
917
 
727
918
  smalltalk.addMethod(
728
- unescape('_testToBy'),
919
+ "_testSqrt",
729
920
  smalltalk.method({
730
- selector: unescape('testToBy'),
921
+ selector: "testSqrt",
731
922
  category: 'tests',
732
- fn: function () {
923
+ fn: function (){
733
924
  var self=this;
734
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((0), "_to_by_", [(6), (2)]), [(0), (2), (4), (6)]]);
735
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send((1), "_to_by_", [(4), (0)]);}), (smalltalk.Error || Error)]);
925
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((4), "_sqrt", []), "__eq", [(2)])]);
926
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((16), "_sqrt", []), "__eq", [(4)])]);
736
927
  return self;},
737
928
  args: [],
738
- source: unescape('testToBy%0A%09self%20assert%3A%20%280%20to%3A%206%20by%3A%202%29%20equals%3A%20%23%280%202%204%206%29.%0A%0A%09self%20should%3A%20%5B1%20to%3A%204%20by%3A%200%5D%20raise%3A%20Error'),
739
- messageSends: ["assert:equals:", "to:by:", "should:raise:"],
740
- referencedClasses: ["Error"]
929
+ source: "testSqrt\x0a\x09\x0a\x09self assert: 4 sqrt = 2.\x0a\x09self assert: 16 sqrt = 4",
930
+ messageSends: ["assert:", "=", "sqrt"],
931
+ referencedClasses: []
741
932
  }),
742
933
  smalltalk.NumberTest);
743
934
 
744
-
745
-
746
- smalltalk.addClass('JSObjectProxyTest', smalltalk.TestCase, [], 'Kernel-Tests');
747
935
  smalltalk.addMethod(
748
- unescape('_jsObject'),
936
+ "_testSquared",
749
937
  smalltalk.method({
750
- selector: unescape('jsObject'),
751
- category: 'accessing',
752
- fn: function () {
938
+ selector: "testSquared",
939
+ category: 'tests',
940
+ fn: function (){
753
941
  var self=this;
754
- return jsObject = {a: 1, b: function() {return 2;}, c: function(object) {return object;}};
942
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((4), "_squared", []), "__eq", [(16)])]);
755
943
  return self;},
756
944
  args: [],
757
- source: unescape('jsObject%0A%09%3Creturn%20jsObject%20%3D%20%7Ba%3A%201%2C%20b%3A%20function%28%29%20%7Breturn%202%3B%7D%2C%20c%3A%20function%28object%29%20%7Breturn%20object%3B%7D%7D%3E'),
758
- messageSends: [],
945
+ source: "testSquared\x0a\x09\x0a\x09self assert: 4 squared = 16",
946
+ messageSends: ["assert:", "=", "squared"],
759
947
  referencedClasses: []
760
948
  }),
761
- smalltalk.JSObjectProxyTest);
949
+ smalltalk.NumberTest);
762
950
 
763
951
  smalltalk.addMethod(
764
- unescape('_testMethodWithArguments'),
952
+ "_testTimesRepeat",
765
953
  smalltalk.method({
766
- selector: unescape('testMethodWithArguments'),
954
+ selector: "testTimesRepeat",
767
955
  category: 'tests',
768
- fn: function () {
956
+ fn: function (){
769
957
  var self=this;
770
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_hasClass_", ["amber"])]);
771
- smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amber"]);
772
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_hasClass_", ["amber"])]);
773
- smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["amber"]);
774
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_hasClass_", ["amber"])]);
958
+ var i=nil;
959
+ (i=(0));
960
+ smalltalk.send((0), "_timesRepeat_", [(function(){return (i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})]);
961
+ smalltalk.send(self, "_assert_equals_", [i, (0)]);
962
+ smalltalk.send((5), "_timesRepeat_", [(function(){return (i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})]);
963
+ smalltalk.send(self, "_assert_equals_", [i, (5)]);
775
964
  return self;},
776
965
  args: [],
777
- source: unescape('testMethodWithArguments%0A%09self%20deny%3A%20%28%27body%27%20asJQuery%20hasClass%3A%20%27amber%27%29.%0A%0A%09%27body%27%20asJQuery%20addClass%3A%20%27amber%27.%0A%09self%20assert%3A%20%28%27body%27%20asJQuery%20hasClass%3A%20%27amber%27%29.%0A%0A%09%27body%27%20asJQuery%20removeClass%3A%20%27amber%27.%0A%09self%20deny%3A%20%28%27body%27%20asJQuery%20hasClass%3A%20%27amber%27%29.'),
778
- messageSends: ["deny:", "hasClass:", "asJQuery", "addClass:", "assert:", "removeClass:"],
966
+ 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",
967
+ messageSends: ["timesRepeat:", "+", "assert:equals:"],
779
968
  referencedClasses: []
780
969
  }),
781
- smalltalk.JSObjectProxyTest);
970
+ smalltalk.NumberTest);
782
971
 
783
972
  smalltalk.addMethod(
784
- unescape('_testYourself'),
973
+ "_testTo",
785
974
  smalltalk.method({
786
- selector: unescape('testYourself'),
975
+ selector: "testTo",
787
976
  category: 'tests',
788
- fn: function () {
977
+ fn: function (){
789
978
  var self=this;
790
- var body=nil;
791
- (body=(function($rec){smalltalk.send($rec, "_addClass_", ["amber"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send("body", "_asJQuery", [])));
792
- smalltalk.send(self, "_assert_", [smalltalk.send(body, "_hasClass_", ["amber"])]);
793
- smalltalk.send(body, "_removeClass_", ["amber"]);
794
- smalltalk.send(self, "_deny_", [smalltalk.send(body, "_hasClass_", ["amber"])]);
979
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((1), "_to_", [(5)]), [(1), (2), (3), (4), (5)]]);
795
980
  return self;},
796
981
  args: [],
797
- source: unescape('testYourself%0A%09%7Cbody%7C%0A%09body%20%3A%3D%20%27body%27%20asJQuery%0A%09%09%09%09addClass%3A%20%27amber%27%3B%0A%09%09%09%09yourself.%0A%0A%09self%20assert%3A%20%28body%20hasClass%3A%20%27amber%27%29.%0A%0A%09body%20removeClass%3A%20%27amber%27.%0A%09self%20deny%3A%20%28body%20hasClass%3A%20%27amber%27%29.'),
798
- messageSends: ["addClass:", "yourself", "asJQuery", "assert:", "hasClass:", "removeClass:", "deny:"],
982
+ source: "testTo\x0a\x09self assert: (1 to: 5) equals: #(1 2 3 4 5)",
983
+ messageSends: ["assert:equals:", "to:"],
799
984
  referencedClasses: []
800
985
  }),
801
- smalltalk.JSObjectProxyTest);
986
+ smalltalk.NumberTest);
802
987
 
803
988
  smalltalk.addMethod(
804
- unescape('_testPropertyThatReturnsEmptyString'),
989
+ "_testToBy",
805
990
  smalltalk.method({
806
- selector: unescape('testPropertyThatReturnsEmptyString'),
991
+ selector: "testToBy",
807
992
  category: 'tests',
808
- fn: function () {
993
+ fn: function (){
809
994
  var self=this;
810
- document.location.hash = '';
811
- smalltalk.send(self, "_assert_equals_", ["", smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash", [])]);
812
- smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash_", ["test"]);
813
- smalltalk.send(self, "_assert_equals_", [unescape("%23test"), smalltalk.send(smalltalk.send((typeof document == 'undefined' ? nil : document), "_location", []), "_hash", [])]);
995
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((0), "_to_by_", [(6), (2)]), [(0), (2), (4), (6)]]);
996
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send((1), "_to_by_", [(4), (0)]);}), (smalltalk.Error || Error)]);
814
997
  return self;},
815
998
  args: [],
816
- source: unescape('testPropertyThatReturnsEmptyString%0A%09%3Cdocument.location.hash%20%3D%20%27%27%3E.%0A%09self%20assert%3A%20%27%27%20equals%3A%20document%20location%20hash.%0A%0A%09document%20location%20hash%3A%20%27test%27.%0A%09self%20assert%3A%20%27%23test%27%20equals%3A%20document%20location%20hash.'),
817
- messageSends: ["assert:equals:", "hash", "location", "hash:"],
818
- referencedClasses: []
999
+ 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",
1000
+ messageSends: ["assert:equals:", "to:by:", "should:raise:"],
1001
+ referencedClasses: ["Error"]
819
1002
  }),
820
- smalltalk.JSObjectProxyTest);
1003
+ smalltalk.NumberTest);
821
1004
 
822
1005
  smalltalk.addMethod(
823
- unescape('_testDNU'),
1006
+ "_testTruncated",
824
1007
  smalltalk.method({
825
- selector: unescape('testDNU'),
1008
+ selector: "testTruncated",
826
1009
  category: 'tests',
827
- fn: function () {
1010
+ fn: function (){
828
1011
  var self=this;
829
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_foo", []);}), (smalltalk.MessageNotUnderstood || MessageNotUnderstood)]);
1012
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3), "_truncated", []), "__eq", [(3)])]);
1013
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3.212), "_truncated", []), "__eq", [(3)])]);
1014
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3.51), "_truncated", []), "__eq", [(3)])]);
830
1015
  return self;},
831
1016
  args: [],
832
- source: unescape('testDNU%0A%09self%20should%3A%20%5Bself%20jsObject%20foo%5D%20raise%3A%20MessageNotUnderstood'),
833
- messageSends: ["should:raise:", "foo", "jsObject"],
834
- referencedClasses: ["MessageNotUnderstood"]
1017
+ source: "testTruncated\x0a\x09\x0a\x09self assert: 3 truncated = 3.\x0a\x09self assert: 3.212 truncated = 3.\x0a\x09self assert: 3.51 truncated = 3",
1018
+ messageSends: ["assert:", "=", "truncated"],
1019
+ referencedClasses: []
835
1020
  }),
836
- smalltalk.JSObjectProxyTest);
1021
+ smalltalk.NumberTest);
837
1022
 
1023
+
1024
+
1025
+ smalltalk.addClass('ObjectMock', smalltalk.Object, ['foo', 'bar'], 'Kernel-Tests');
838
1026
  smalltalk.addMethod(
839
- unescape('_testMessageSend'),
1027
+ "_foo",
840
1028
  smalltalk.method({
841
- selector: unescape('testMessageSend'),
842
- category: 'tests',
843
- fn: function () {
1029
+ selector: "foo",
1030
+ category: 'not yet classified',
1031
+ fn: function (){
844
1032
  var self=this;
845
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(self, "_jsObject", []), "_a", []), (1)]);
846
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(self, "_jsObject", []), "_b", []), (2)]);
847
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(self, "_jsObject", []), "_c_", [(3)]), (3)]);
1033
+ return self['@foo'];
848
1034
  return self;},
849
1035
  args: [],
850
- source: unescape('testMessageSend%0A%0A%09self%20assert%3A%20self%20jsObject%20a%20equals%3A%201.%0A%09self%20assert%3A%20self%20jsObject%20b%20equals%3A%202.%0A%09self%20assert%3A%20%28self%20jsObject%20c%3A%203%29%20equals%3A%203'),
851
- messageSends: ["assert:equals:", "a", "jsObject", "b", "c:"],
1036
+ source: "foo\x0a\x09^foo",
1037
+ messageSends: [],
852
1038
  referencedClasses: []
853
1039
  }),
854
- smalltalk.JSObjectProxyTest);
1040
+ smalltalk.ObjectMock);
855
1041
 
856
1042
  smalltalk.addMethod(
857
- unescape('_testPrinting'),
1043
+ "_foo_",
858
1044
  smalltalk.method({
859
- selector: unescape('testPrinting'),
860
- category: 'tests',
861
- fn: function () {
1045
+ selector: "foo:",
1046
+ category: 'not yet classified',
1047
+ fn: function (anObject){
862
1048
  var self=this;
863
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_jsObject", []), "_printString", []), "__eq", [unescape("%5Bobject%20Object%5D")])]);
1049
+ (self['@foo']=anObject);
864
1050
  return self;},
865
- args: [],
866
- source: unescape('testPrinting%0A%09self%20assert%3A%20self%20jsObject%20printString%20%3D%20%27%5Bobject%20Object%5D%27'),
867
- messageSends: ["assert:", unescape("%3D"), "printString", "jsObject"],
1051
+ args: ["anObject"],
1052
+ source: "foo: anObject\x0a\x09foo := anObject",
1053
+ messageSends: [],
868
1054
  referencedClasses: []
869
1055
  }),
870
- smalltalk.JSObjectProxyTest);
1056
+ smalltalk.ObjectMock);
871
1057
 
872
1058
 
873
1059
 
874
- smalltalk.addClass('PackageTest', smalltalk.TestCase, ['zorkPackage', 'grulPackage', 'backUpCommitPathJs', 'backUpCommitPathSt'], 'Kernel-Tests');
1060
+ smalltalk.addClass('ObjectTest', smalltalk.TestCase, [], 'Kernel-Tests');
875
1061
  smalltalk.addMethod(
876
- unescape('_setUp'),
1062
+ "_testBasicAccess",
877
1063
  smalltalk.method({
878
- selector: unescape('setUp'),
879
- category: 'running',
880
- fn: function () {
1064
+ selector: "testBasicAccess",
1065
+ category: 'tests',
1066
+ fn: function (){
881
1067
  var self=this;
882
- (self['@backUpCommitPathJs']=smalltalk.send((smalltalk.Package || Package), "_defaultCommitPathJs", []));
883
- (self['@backUpCommitPathSt']=smalltalk.send((smalltalk.Package || Package), "_defaultCommitPathSt", []));
884
- smalltalk.send((smalltalk.Package || Package), "_resetCommitPaths", []);
885
- (self['@zorkPackage']=smalltalk.send(smalltalk.send((smalltalk.Package || Package), "_new", []), "_name_", ["Zork"]));
886
- (self['@grulPackage']=(function($rec){smalltalk.send($rec, "_name_", ["Grul"]);smalltalk.send($rec, "_commitPathJs_", [unescape("server/grul/js")]);smalltalk.send($rec, "_commitPathSt_", [unescape("grul/st")]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Package || Package), "_new", [])));
1068
+ var o=nil;
1069
+ (o=smalltalk.send((smalltalk.Object || Object), "_new", []));
1070
+ smalltalk.send(o, "_basicAt_put_", ["a", (1)]);
1071
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_basicAt_", ["a"]), (1)]);
1072
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_basicAt_", ["b"]), nil]);
887
1073
  return self;},
888
1074
  args: [],
889
- source: unescape('setUp%0A%09backUpCommitPathJs%20%3A%3D%20Package%20defaultCommitPathJs.%0A%09backUpCommitPathSt%20%3A%3D%20Package%20defaultCommitPathSt.%0A%0A%09Package%20resetCommitPaths.%0A%0A%09zorkPackage%20%3A%3D%20Package%20new%20name%3A%20%27Zork%27.%0A%09grulPackage%20%3A%3D%20Package%20new%20%0A%09%09%09%09%09name%3A%20%27Grul%27%3B%0A%09%09%09%09%09commitPathJs%3A%20%27server/grul/js%27%3B%0A%09%09%09%09%09commitPathSt%3A%20%27grul/st%27%3B%0A%09%09%09%09%09yourself'),
890
- messageSends: ["defaultCommitPathJs", "defaultCommitPathSt", "resetCommitPaths", "name:", "new", "commitPathJs:", "commitPathSt:", "yourself"],
891
- referencedClasses: ["Package"]
1075
+ 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",
1076
+ messageSends: ["new", "basicAt:put:", "assert:equals:", "basicAt:"],
1077
+ referencedClasses: ["Object"]
892
1078
  }),
893
- smalltalk.PackageTest);
1079
+ smalltalk.ObjectTest);
894
1080
 
895
1081
  smalltalk.addMethod(
896
- unescape('_tearDown'),
1082
+ "_testBasicPerform",
897
1083
  smalltalk.method({
898
- selector: unescape('tearDown'),
899
- category: 'running',
900
- fn: function () {
1084
+ selector: "testBasicPerform",
1085
+ category: 'tests',
1086
+ fn: function (){
901
1087
  var self=this;
902
- (function($rec){smalltalk.send($rec, "_defaultCommitPathJs_", [self['@backUpCommitPathJs']]);return smalltalk.send($rec, "_defaultCommitPathSt_", [self['@backUpCommitPathSt']]);})((smalltalk.Package || Package));
1088
+ var o=nil;
1089
+ (o=smalltalk.send((smalltalk.Object || Object), "_new", []));
1090
+ smalltalk.send(o, "_basicAt_put_", ["func", (function(){return "hello";})]);
1091
+ smalltalk.send(o, "_basicAt_put_", ["func2", (function(a){return ((($receiver = a).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]);
1092
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_basicPerform_", ["func"]), "hello"]);
1093
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_basicPerform_withArguments_", ["func2", [(3)]]), (4)]);
903
1094
  return self;},
904
1095
  args: [],
905
- source: unescape('tearDown%0A%09%20Package%20%0A%09%09defaultCommitPathJs%3A%20backUpCommitPathJs%3B%0A%09%09defaultCommitPathSt%3A%20backUpCommitPathSt'),
906
- messageSends: ["defaultCommitPathJs:", "defaultCommitPathSt:"],
907
- referencedClasses: ["Package"]
1096
+ 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",
1097
+ messageSends: ["new", "basicAt:put:", "+", "assert:equals:", "basicPerform:", "basicPerform:withArguments:"],
1098
+ referencedClasses: ["Object"]
908
1099
  }),
909
- smalltalk.PackageTest);
1100
+ smalltalk.ObjectTest);
910
1101
 
911
1102
  smalltalk.addMethod(
912
- unescape('_testGrulCommitPathStShouldBeGrulSt'),
1103
+ "_testDNU",
913
1104
  smalltalk.method({
914
- selector: unescape('testGrulCommitPathStShouldBeGrulSt'),
1105
+ selector: "testDNU",
915
1106
  category: 'tests',
916
- fn: function () {
1107
+ fn: function (){
917
1108
  var self=this;
918
- smalltalk.send(self, "_assert_equals_", [unescape("grul/st"), smalltalk.send(self['@grulPackage'], "_commitPathSt", [])]);
1109
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(smalltalk.send((smalltalk.Object || Object), "_new", []), "_foo", []);}), (smalltalk.MessageNotUnderstood || MessageNotUnderstood)]);
919
1110
  return self;},
920
1111
  args: [],
921
- source: unescape('testGrulCommitPathStShouldBeGrulSt%0A%09self%20assert%3A%20%27grul/st%27%20equals%3A%20grulPackage%20commitPathSt'),
922
- messageSends: ["assert:equals:", "commitPathSt"],
923
- referencedClasses: []
1112
+ source: "testDNU\x0a\x09self should: [Object new foo] raise: MessageNotUnderstood",
1113
+ messageSends: ["should:raise:", "foo", "new"],
1114
+ referencedClasses: ["Object", "MessageNotUnderstood"]
924
1115
  }),
925
- smalltalk.PackageTest);
1116
+ smalltalk.ObjectTest);
926
1117
 
927
1118
  smalltalk.addMethod(
928
- unescape('_testZorkCommitPathStShouldBeSt'),
1119
+ "_testEquality",
929
1120
  smalltalk.method({
930
- selector: unescape('testZorkCommitPathStShouldBeSt'),
1121
+ selector: "testEquality",
931
1122
  category: 'tests',
932
- fn: function () {
1123
+ fn: function (){
933
1124
  var self=this;
934
- smalltalk.send(self, "_assert_equals_", ["st", smalltalk.send(self['@zorkPackage'], "_commitPathSt", [])]);
1125
+ var o=nil;
1126
+ (o=smalltalk.send((smalltalk.Object || Object), "_new", []));
1127
+ smalltalk.send(self, "_deny_", [smalltalk.send(o, "__eq", [smalltalk.send((smalltalk.Object || Object), "_new", [])])]);
1128
+ smalltalk.send(self, "_assert_", [smalltalk.send(o, "__eq", [o])]);
1129
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o, "_yourself", []), "__eq", [o])]);
1130
+ smalltalk.send(self, "_assert_", [smalltalk.send(o, "__eq", [smalltalk.send(o, "_yourself", [])])]);
935
1131
  return self;},
936
1132
  args: [],
937
- source: unescape('testZorkCommitPathStShouldBeSt%0A%09self%20assert%3A%20%27st%27%20equals%3A%20zorkPackage%20commitPathSt'),
938
- messageSends: ["assert:equals:", "commitPathSt"],
939
- referencedClasses: []
1133
+ 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",
1134
+ messageSends: ["new", "deny:", "=", "assert:", "yourself"],
1135
+ referencedClasses: ["Object"]
940
1136
  }),
941
- smalltalk.PackageTest);
1137
+ smalltalk.ObjectTest);
942
1138
 
943
1139
  smalltalk.addMethod(
944
- unescape('_testZorkCommitPathJsShouldBeJs'),
1140
+ "_testHalt",
945
1141
  smalltalk.method({
946
- selector: unescape('testZorkCommitPathJsShouldBeJs'),
1142
+ selector: "testHalt",
947
1143
  category: 'tests',
948
- fn: function () {
1144
+ fn: function (){
949
1145
  var self=this;
950
- smalltalk.send(self, "_assert_equals_", ["js", smalltalk.send(self['@zorkPackage'], "_commitPathJs", [])]);
1146
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(smalltalk.send((smalltalk.Object || Object), "_new", []), "_halt", []);}), (smalltalk.Error || Error)]);
951
1147
  return self;},
952
1148
  args: [],
953
- source: unescape('testZorkCommitPathJsShouldBeJs%0A%09self%20assert%3A%20%27js%27%20equals%3A%20zorkPackage%20commitPathJs'),
954
- messageSends: ["assert:equals:", "commitPathJs"],
955
- referencedClasses: []
1149
+ source: "testHalt\x0a\x09self should: [Object new halt] raise: Error",
1150
+ messageSends: ["should:raise:", "halt", "new"],
1151
+ referencedClasses: ["Object", "Error"]
956
1152
  }),
957
- smalltalk.PackageTest);
1153
+ smalltalk.ObjectTest);
958
1154
 
959
1155
  smalltalk.addMethod(
960
- unescape('_testGrulCommitPathJsShouldBeServerGrulJs'),
1156
+ "_testIdentity",
961
1157
  smalltalk.method({
962
- selector: unescape('testGrulCommitPathJsShouldBeServerGrulJs'),
1158
+ selector: "testIdentity",
963
1159
  category: 'tests',
964
- fn: function () {
1160
+ fn: function (){
965
1161
  var self=this;
966
- smalltalk.send(self, "_assert_equals_", [unescape("server/grul/js"), smalltalk.send(self['@grulPackage'], "_commitPathJs", [])]);
1162
+ var o=nil;
1163
+ (o=smalltalk.send((smalltalk.Object || Object), "_new", []));
1164
+ smalltalk.send(self, "_deny_", [smalltalk.send(o, "__eq_eq", [smalltalk.send((smalltalk.Object || Object), "_new", [])])]);
1165
+ smalltalk.send(self, "_assert_", [smalltalk.send(o, "__eq_eq", [o])]);
1166
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o, "_yourself", []), "__eq_eq", [o])]);
1167
+ smalltalk.send(self, "_assert_", [smalltalk.send(o, "__eq_eq", [smalltalk.send(o, "_yourself", [])])]);
967
1168
  return self;},
968
1169
  args: [],
969
- source: unescape('testGrulCommitPathJsShouldBeServerGrulJs%0A%09self%20assert%3A%20%27server/grul/js%27%20equals%3A%20grulPackage%20commitPathJs'),
970
- messageSends: ["assert:equals:", "commitPathJs"],
971
- referencedClasses: []
1170
+ 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",
1171
+ messageSends: ["new", "deny:", "==", "assert:", "yourself"],
1172
+ referencedClasses: ["Object"]
972
1173
  }),
973
- smalltalk.PackageTest);
974
-
975
-
1174
+ smalltalk.ObjectTest);
976
1175
 
977
- smalltalk.addClass('BlockClosureTest', smalltalk.TestCase, [], 'Kernel-Tests');
978
1176
  smalltalk.addMethod(
979
- unescape('_testValue'),
1177
+ "_testIfNil",
980
1178
  smalltalk.method({
981
- selector: unescape('testValue'),
1179
+ selector: "testIfNil",
982
1180
  category: 'tests',
983
- fn: function () {
1181
+ fn: function (){
984
1182
  var self=this;
985
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(){return (1) + (1);}), "_value", []), (2)]);
986
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(x){return ((($receiver = x).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));}), "_value_", [(2)]), (3)]);
987
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(x, y){return ((($receiver = x).klass === smalltalk.Number) ? $receiver *y : smalltalk.send($receiver, "__star", [y]));}), "_value_value_", [(2), (4)]), (8)]);
988
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(a, b, c){return (1);}), "_value", []), (1)]);
1183
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send((smalltalk.Object || Object), "_new", []), "_isNil", [])]);
1184
+ smalltalk.send(self, "_deny_", [smalltalk.send((($receiver = smalltalk.send((smalltalk.Object || Object), "_new", [])) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver, "__eq", [true])]);
1185
+ smalltalk.send(self, "_assert_", [smalltalk.send((($receiver = smalltalk.send((smalltalk.Object || Object), "_new", [])) != nil && $receiver != undefined) ? (function(){return true;})() : nil, "__eq", [true])]);
1186
+ smalltalk.send(self, "_assert_", [smalltalk.send((($receiver = smalltalk.send((smalltalk.Object || Object), "_new", [])) == nil || $receiver == undefined) ? (function(){return false;})() : (function(){return true;})(), "__eq", [true])]);
1187
+ smalltalk.send(self, "_assert_", [smalltalk.send((($receiver = smalltalk.send((smalltalk.Object || Object), "_new", [])) == nil || $receiver == undefined) ? (function(){return false;})() : (function(){return true;})(), "__eq", [true])]);
989
1188
  return self;},
990
1189
  args: [],
991
- source: unescape('testValue%0A%09self%20assert%3A%20%28%5B1+1%5D%20value%29%20equals%3A%202.%0A%09self%20assert%3A%20%28%5B%3Ax%20%7C%20x%20+1%5D%20value%3A%202%29%20equals%3A%203.%0A%09self%20assert%3A%20%28%5B%3Ax%20%3Ay%20%7C%20x*y%5D%20value%3A%202%20value%3A%204%29%20equals%3A%208.%20%0A%0A%09%22Arguments%20are%20optional%20in%20Amber.%20This%20isn%27t%20ANSI%20compliant.%22%0A%0A%09self%20assert%3A%20%28%5B%3Aa%20%3Ab%20%3Ac%20%7C%201%5D%20value%29%20equals%3A%201'),
992
- messageSends: ["assert:equals:", "value", unescape("+"), "value:", "value:value:", unescape("*")],
993
- referencedClasses: []
1190
+ 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",
1191
+ messageSends: ["deny:", "isNil", "new", "=", "ifNil:", "assert:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"],
1192
+ referencedClasses: ["Object"]
994
1193
  }),
995
- smalltalk.BlockClosureTest);
1194
+ smalltalk.ObjectTest);
996
1195
 
997
1196
  smalltalk.addMethod(
998
- unescape('_testOnDo'),
1197
+ "_testInstVars",
999
1198
  smalltalk.method({
1000
- selector: unescape('testOnDo'),
1199
+ selector: "testInstVars",
1001
1200
  category: 'tests',
1002
- fn: function () {
1201
+ fn: function (){
1003
1202
  var self=this;
1004
- smalltalk.send(self, "_assert_", [smalltalk.send((function(){return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_signal", []);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return true;})])]);
1203
+ var o=nil;
1204
+ (o=smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_new", []));
1205
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_instVarAt_", [smalltalk.symbolFor("foo")]), nil]);
1206
+ smalltalk.send(o, "_instVarAt_put_", [smalltalk.symbolFor("foo"), (1)]);
1207
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_instVarAt_", [smalltalk.symbolFor("foo")]), (1)]);
1208
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_instVarAt_", ["foo"]), (1)]);
1005
1209
  return self;},
1006
1210
  args: [],
1007
- source: unescape('testOnDo%0A%09self%20assert%3A%20%28%5BError%20new%20signal%5D%20on%3A%20Error%20do%3A%20%5B%3Aex%20%7C%20true%5D%29'),
1008
- messageSends: ["assert:", "on:do:", "signal", "new"],
1009
- referencedClasses: ["Error"]
1211
+ 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",
1212
+ messageSends: ["new", "assert:equals:", "instVarAt:", "instVarAt:put:"],
1213
+ referencedClasses: ["ObjectMock"]
1010
1214
  }),
1011
- smalltalk.BlockClosureTest);
1215
+ smalltalk.ObjectTest);
1012
1216
 
1013
1217
  smalltalk.addMethod(
1014
- unescape('_testEnsure'),
1218
+ "_testNilUndefined",
1015
1219
  smalltalk.method({
1016
- selector: unescape('testEnsure'),
1220
+ selector: "testNilUndefined",
1017
1221
  category: 'tests',
1018
- fn: function () {
1222
+ fn: function (){
1019
1223
  var self=this;
1020
- smalltalk.send(self, "_assert_", [smalltalk.send((function(){return smalltalk.send((smalltalk.Error || Error), "_new", []);}), "_ensure_", [(function(){return true;})])]);
1224
+ smalltalk.send(self, "_assert_", [smalltalk.send(nil, "__eq", [(typeof undefined == 'undefined' ? nil : undefined)])]);
1021
1225
  return self;},
1022
1226
  args: [],
1023
- source: unescape('testEnsure%0A%09self%20assert%3A%20%28%5BError%20new%5D%20ensure%3A%20%5Btrue%5D%29'),
1024
- messageSends: ["assert:", "ensure:", "new"],
1025
- referencedClasses: ["Error"]
1227
+ source: "testNilUndefined\x0a\x09\x22nil in Smalltalk is the undefined object in JS\x22\x0a\x0a\x09self assert: nil = undefined",
1228
+ messageSends: ["assert:", "="],
1229
+ referencedClasses: []
1026
1230
  }),
1027
- smalltalk.BlockClosureTest);
1231
+ smalltalk.ObjectTest);
1028
1232
 
1029
1233
  smalltalk.addMethod(
1030
- unescape('_testNumArgs'),
1234
+ "_testYourself",
1031
1235
  smalltalk.method({
1032
- selector: unescape('testNumArgs'),
1236
+ selector: "testYourself",
1033
1237
  category: 'tests',
1034
- fn: function () {
1238
+ fn: function (){
1035
1239
  var self=this;
1036
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(){return nil;}), "_numArgs", []), (0)]);
1037
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(a, b){return nil;}), "_numArgs", []), (2)]);
1240
+ var o=nil;
1241
+ (o=smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_new", []));
1242
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o, "_yourself", []), "__eq_eq", [o])]);
1038
1243
  return self;},
1039
1244
  args: [],
1040
- source: unescape('testNumArgs%0A%09self%20assert%3A%20%5B%5D%20numArgs%20equals%3A%200.%0A%09self%20assert%3A%20%5B%3Aa%20%3Ab%20%7C%20%5D%20numArgs%20equals%3A%202'),
1041
- messageSends: ["assert:equals:", "numArgs"],
1042
- referencedClasses: []
1245
+ source: "testYourself\x0a\x09| o |\x0a\x09o := ObjectMock new.\x0a\x09self assert: o yourself == o",
1246
+ messageSends: ["new", "assert:", "==", "yourself"],
1247
+ referencedClasses: ["ObjectMock"]
1043
1248
  }),
1044
- smalltalk.BlockClosureTest);
1249
+ smalltalk.ObjectTest);
1045
1250
 
1046
1251
  smalltalk.addMethod(
1047
- unescape('_testValueWithPossibleArguments'),
1252
+ "_testidentityHash",
1048
1253
  smalltalk.method({
1049
- selector: unescape('testValueWithPossibleArguments'),
1254
+ selector: "testidentityHash",
1050
1255
  category: 'tests',
1051
- fn: function () {
1256
+ fn: function (){
1052
1257
  var self=this;
1053
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(){return (1);}), "_valueWithPossibleArguments_", [[(3), (4)]]), (1)]);
1054
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(a){return ((($receiver = a).klass === smalltalk.Number) ? $receiver +(4) : smalltalk.send($receiver, "__plus", [(4)]));}), "_valueWithPossibleArguments_", [[(3), (4)]]), (7)]);
1055
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((function(a, b){return ((($receiver = a).klass === smalltalk.Number) ? $receiver +b : smalltalk.send($receiver, "__plus", [b]));}), "_valueWithPossibleArguments_", [[(3), (4), (5)]]), (7)]);
1258
+ var o1=nil;
1259
+ var o2=nil;
1260
+ (o1=smalltalk.send((smalltalk.Object || Object), "_new", []));
1261
+ (o2=smalltalk.send((smalltalk.Object || Object), "_new", []));
1262
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o1, "_identityHash", []), "__eq_eq", [smalltalk.send(o1, "_identityHash", [])])]);
1263
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(o1, "_identityHash", []), "__eq_eq", [smalltalk.send(o2, "_identityHash", [])])]);
1056
1264
  return self;},
1057
1265
  args: [],
1058
- source: unescape('testValueWithPossibleArguments%0A%09self%20assert%3A%20%28%5B1%5D%20valueWithPossibleArguments%3A%20%23%283%204%29%29%20equals%3A%201.%0A%09self%20assert%3A%20%28%5B%3Aa%20%7C%20a%20+%204%5D%20valueWithPossibleArguments%3A%20%23%283%204%29%29%20equals%3A%207.%0A%09self%20assert%3A%20%28%5B%3Aa%20%3Ab%20%7C%20a%20+%20b%5D%20valueWithPossibleArguments%3A%20%23%283%204%205%29%29%20equals%3A%207.'),
1059
- messageSends: ["assert:equals:", "valueWithPossibleArguments:", unescape("+")],
1060
- referencedClasses: []
1266
+ 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",
1267
+ messageSends: ["new", "assert:", "==", "identityHash", "deny:"],
1268
+ referencedClasses: ["Object"]
1061
1269
  }),
1062
- smalltalk.BlockClosureTest);
1270
+ smalltalk.ObjectTest);
1271
+
1272
+
1063
1273
 
1274
+ smalltalk.addClass('PackageTest', smalltalk.TestCase, ['zorkPackage', 'grulPackage', 'backUpCommitPathJs', 'backUpCommitPathSt'], 'Kernel-Tests');
1064
1275
  smalltalk.addMethod(
1065
- unescape('_testWhileTrue'),
1276
+ "_setUp",
1066
1277
  smalltalk.method({
1067
- selector: unescape('testWhileTrue'),
1068
- category: 'tests',
1069
- fn: function () {
1278
+ selector: "setUp",
1279
+ category: 'running',
1280
+ fn: function (){
1070
1281
  var self=this;
1071
- var i=nil;
1072
- (i=(0));
1073
- (function(){while((function(){return ((($receiver = i).klass === smalltalk.Number) ? $receiver <(5) : smalltalk.send($receiver, "__lt", [(5)]));})()) {(function(){return (i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
1074
- smalltalk.send(self, "_assert_equals_", [i, (5)]);
1075
- (i=(0));
1076
- (function(){while((function(){(i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return ((($receiver = i).klass === smalltalk.Number) ? $receiver <(5) : smalltalk.send($receiver, "__lt", [(5)]));})()) {}})();
1077
- smalltalk.send(self, "_assert_equals_", [i, (5)]);
1282
+ (self['@backUpCommitPathJs']=smalltalk.send((smalltalk.Package || Package), "_defaultCommitPathJs", []));
1283
+ (self['@backUpCommitPathSt']=smalltalk.send((smalltalk.Package || Package), "_defaultCommitPathSt", []));
1284
+ smalltalk.send((smalltalk.Package || Package), "_resetCommitPaths", []);
1285
+ (self['@zorkPackage']=smalltalk.send(smalltalk.send((smalltalk.Package || Package), "_new", []), "_name_", ["Zork"]));
1286
+ (self['@grulPackage']=(function($rec){smalltalk.send($rec, "_name_", ["Grul"]);smalltalk.send($rec, "_commitPathJs_", ["server/grul/js"]);smalltalk.send($rec, "_commitPathSt_", ["grul/st"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Package || Package), "_new", [])));
1078
1287
  return self;},
1079
1288
  args: [],
1080
- source: unescape('testWhileTrue%0A%09%7C%20i%20%7C%0A%09i%20%3A%3D%200.%0A%09%5Bi%20%3C%205%5D%20whileTrue%3A%20%5Bi%20%3A%3D%20i%20+%201%5D.%0A%09self%20assert%3A%20i%20equals%3A%205.%0A%0A%09i%20%3A%3D%200.%0A%09%5Bi%20%3A%3D%20i%20+%201.%20i%20%3C%205%5D%20whileTrue.%0A%09self%20assert%3A%20i%20equals%3A%205'),
1081
- messageSends: ["whileTrue:", unescape("%3C"), unescape("+"), "assert:equals:", "whileTrue"],
1082
- referencedClasses: []
1289
+ 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",
1290
+ messageSends: ["defaultCommitPathJs", "defaultCommitPathSt", "resetCommitPaths", "name:", "new", "commitPathJs:", "commitPathSt:", "yourself"],
1291
+ referencedClasses: ["Package"]
1083
1292
  }),
1084
- smalltalk.BlockClosureTest);
1293
+ smalltalk.PackageTest);
1085
1294
 
1086
1295
  smalltalk.addMethod(
1087
- unescape('_testWhileFalse'),
1296
+ "_tearDown",
1088
1297
  smalltalk.method({
1089
- selector: unescape('testWhileFalse'),
1090
- category: 'tests',
1091
- fn: function () {
1298
+ selector: "tearDown",
1299
+ category: 'running',
1300
+ fn: function (){
1092
1301
  var self=this;
1093
- var i=nil;
1094
- (i=(0));
1095
- (function(){while(!(function(){return ((($receiver = i).klass === smalltalk.Number) ? $receiver >(5) : smalltalk.send($receiver, "__gt", [(5)]));})()) {(function(){return (i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
1096
- smalltalk.send(self, "_assert_equals_", [i, (6)]);
1097
- (i=(0));
1098
- (function(){while(!(function(){(i=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));return ((($receiver = i).klass === smalltalk.Number) ? $receiver >(5) : smalltalk.send($receiver, "__gt", [(5)]));})()) {}})();
1099
- smalltalk.send(self, "_assert_equals_", [i, (6)]);
1302
+ (function($rec){smalltalk.send($rec, "_defaultCommitPathJs_", [self['@backUpCommitPathJs']]);return smalltalk.send($rec, "_defaultCommitPathSt_", [self['@backUpCommitPathSt']]);})((smalltalk.Package || Package));
1100
1303
  return self;},
1101
1304
  args: [],
1102
- source: unescape('testWhileFalse%0A%09%7C%20i%20%7C%0A%09i%20%3A%3D%200.%0A%09%5Bi%20%3E%205%5D%20whileFalse%3A%20%5Bi%20%3A%3D%20i%20+%201%5D.%0A%09self%20assert%3A%20i%20equals%3A%206.%0A%0A%09i%20%3A%3D%200.%0A%09%5Bi%20%3A%3D%20i%20+%201.%20i%20%3E%205%5D%20whileFalse.%0A%09self%20assert%3A%20i%20equals%3A%206'),
1103
- messageSends: ["whileFalse:", unescape("%3E"), unescape("+"), "assert:equals:", "whileFalse"],
1104
- referencedClasses: []
1305
+ source: "tearDown\x0a\x09 Package \x0a\x09\x09defaultCommitPathJs: backUpCommitPathJs;\x0a\x09\x09defaultCommitPathSt: backUpCommitPathSt",
1306
+ messageSends: ["defaultCommitPathJs:", "defaultCommitPathSt:"],
1307
+ referencedClasses: ["Package"]
1105
1308
  }),
1106
- smalltalk.BlockClosureTest);
1309
+ smalltalk.PackageTest);
1107
1310
 
1108
1311
  smalltalk.addMethod(
1109
- unescape('_testCompiledSource'),
1312
+ "_testGrulCommitPathJsShouldBeServerGrulJs",
1110
1313
  smalltalk.method({
1111
- selector: unescape('testCompiledSource'),
1314
+ selector: "testGrulCommitPathJsShouldBeServerGrulJs",
1112
1315
  category: 'tests',
1113
- fn: function () {
1316
+ fn: function (){
1114
1317
  var self=this;
1115
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((function(){return (1) + (1);}), "_compiledSource", []), "_includesSubString_", ["function"])]);
1318
+ smalltalk.send(self, "_assert_equals_", ["server/grul/js", smalltalk.send(self['@grulPackage'], "_commitPathJs", [])]);
1116
1319
  return self;},
1117
1320
  args: [],
1118
- source: unescape('testCompiledSource%0A%09self%20assert%3A%20%28%5B1+1%5D%20compiledSource%20includesSubString%3A%20%27function%27%29'),
1119
- messageSends: ["assert:", "includesSubString:", "compiledSource", unescape("+")],
1321
+ source: "testGrulCommitPathJsShouldBeServerGrulJs\x0a\x09self assert: 'server/grul/js' equals: grulPackage commitPathJs",
1322
+ messageSends: ["assert:equals:", "commitPathJs"],
1120
1323
  referencedClasses: []
1121
1324
  }),
1122
- smalltalk.BlockClosureTest);
1123
-
1124
-
1325
+ smalltalk.PackageTest);
1125
1326
 
1126
- smalltalk.addClass('ObjectTest', smalltalk.TestCase, [], 'Kernel-Tests');
1127
1327
  smalltalk.addMethod(
1128
- unescape('_testEquality'),
1328
+ "_testGrulCommitPathStShouldBeGrulSt",
1129
1329
  smalltalk.method({
1130
- selector: unescape('testEquality'),
1330
+ selector: "testGrulCommitPathStShouldBeGrulSt",
1131
1331
  category: 'tests',
1132
- fn: function () {
1332
+ fn: function (){
1133
1333
  var self=this;
1134
- var o=nil;
1135
- (o=smalltalk.send((smalltalk.Object || Object), "_new", []));
1136
- smalltalk.send(self, "_deny_", [smalltalk.send(o, "__eq", [smalltalk.send((smalltalk.Object || Object), "_new", [])])]);
1137
- smalltalk.send(self, "_assert_", [smalltalk.send(o, "__eq", [o])]);
1138
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o, "_yourself", []), "__eq", [o])]);
1139
- smalltalk.send(self, "_assert_", [smalltalk.send(o, "__eq", [smalltalk.send(o, "_yourself", [])])]);
1334
+ smalltalk.send(self, "_assert_equals_", ["grul/st", smalltalk.send(self['@grulPackage'], "_commitPathSt", [])]);
1140
1335
  return self;},
1141
1336
  args: [],
1142
- source: unescape('testEquality%0A%09%7C%20o%20%7C%0A%09o%20%3A%3D%20Object%20new.%0A%09self%20deny%3A%20o%20%3D%20Object%20new.%0A%09self%20assert%3A%20o%20%3D%20o.%0A%09self%20assert%3A%20o%20yourself%20%3D%20o.%0A%09self%20assert%3A%20o%20%3D%20o%20yourself'),
1143
- messageSends: ["new", "deny:", unescape("%3D"), "assert:", "yourself"],
1144
- referencedClasses: ["Object"]
1337
+ source: "testGrulCommitPathStShouldBeGrulSt\x0a\x09self assert: 'grul/st' equals: grulPackage commitPathSt",
1338
+ messageSends: ["assert:equals:", "commitPathSt"],
1339
+ referencedClasses: []
1145
1340
  }),
1146
- smalltalk.ObjectTest);
1341
+ smalltalk.PackageTest);
1147
1342
 
1148
1343
  smalltalk.addMethod(
1149
- unescape('_testIdentity'),
1344
+ "_testZorkCommitPathJsShouldBeJs",
1150
1345
  smalltalk.method({
1151
- selector: unescape('testIdentity'),
1346
+ selector: "testZorkCommitPathJsShouldBeJs",
1152
1347
  category: 'tests',
1153
- fn: function () {
1348
+ fn: function (){
1154
1349
  var self=this;
1155
- var o=nil;
1156
- (o=smalltalk.send((smalltalk.Object || Object), "_new", []));
1157
- smalltalk.send(self, "_deny_", [smalltalk.send(o, "__eq_eq", [smalltalk.send((smalltalk.Object || Object), "_new", [])])]);
1158
- smalltalk.send(self, "_assert_", [smalltalk.send(o, "__eq_eq", [o])]);
1350
+ smalltalk.send(self, "_assert_equals_", ["js", smalltalk.send(self['@zorkPackage'], "_commitPathJs", [])]);
1159
1351
  return self;},
1160
1352
  args: [],
1161
- source: unescape('testIdentity%0A%09%7C%20o%20%7C%0A%09o%20%3A%3D%20Object%20new.%0A%09self%20deny%3A%20o%20%3D%3D%20Object%20new.%0A%09self%20assert%3A%20o%20%3D%3D%20o'),
1162
- messageSends: ["new", "deny:", unescape("%3D%3D"), "assert:"],
1163
- referencedClasses: ["Object"]
1353
+ source: "testZorkCommitPathJsShouldBeJs\x0a\x09self assert: 'js' equals: zorkPackage commitPathJs",
1354
+ messageSends: ["assert:equals:", "commitPathJs"],
1355
+ referencedClasses: []
1164
1356
  }),
1165
- smalltalk.ObjectTest);
1357
+ smalltalk.PackageTest);
1166
1358
 
1167
1359
  smalltalk.addMethod(
1168
- unescape('_testHalt'),
1360
+ "_testZorkCommitPathStShouldBeSt",
1169
1361
  smalltalk.method({
1170
- selector: unescape('testHalt'),
1362
+ selector: "testZorkCommitPathStShouldBeSt",
1171
1363
  category: 'tests',
1172
- fn: function () {
1364
+ fn: function (){
1173
1365
  var self=this;
1174
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(smalltalk.send((smalltalk.Object || Object), "_new", []), "_halt", []);}), (smalltalk.Error || Error)]);
1366
+ smalltalk.send(self, "_assert_equals_", ["st", smalltalk.send(self['@zorkPackage'], "_commitPathSt", [])]);
1175
1367
  return self;},
1176
1368
  args: [],
1177
- source: unescape('testHalt%0A%09self%20should%3A%20%5BObject%20new%20halt%5D%20raise%3A%20Error'),
1178
- messageSends: ["should:raise:", "halt", "new"],
1179
- referencedClasses: ["Object", "Error"]
1369
+ source: "testZorkCommitPathStShouldBeSt\x0a\x09self assert: 'st' equals: zorkPackage commitPathSt",
1370
+ messageSends: ["assert:equals:", "commitPathSt"],
1371
+ referencedClasses: []
1180
1372
  }),
1181
- smalltalk.ObjectTest);
1373
+ smalltalk.PackageTest);
1182
1374
 
1183
- smalltalk.addMethod(
1184
- unescape('_testBasicAccess'),
1185
- smalltalk.method({
1186
- selector: unescape('testBasicAccess'),
1187
- category: 'tests',
1188
- fn: function () {
1189
- var self=this;
1190
- var o=nil;
1191
- (o=smalltalk.send((smalltalk.Object || Object), "_new", []));
1192
- smalltalk.send(o, "_basicAt_put_", ["a", (1)]);
1193
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_basicAt_", ["a"]), (1)]);
1194
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_basicAt_", ["b"]), nil]);
1195
- return self;},
1196
- args: [],
1197
- source: unescape('testBasicAccess%0A%09%7C%20o%20%7C%0A%09o%20%3A%3D%20Object%20new.%0A%09o%20basicAt%3A%20%27a%27%20put%3A%201.%0A%09self%20assert%3A%20%28o%20basicAt%3A%20%27a%27%29%20equals%3A%201.%0A%09self%20assert%3A%20%28o%20basicAt%3A%20%27b%27%29%20equals%3A%20nil'),
1198
- messageSends: ["new", "basicAt:put:", "assert:equals:", "basicAt:"],
1199
- referencedClasses: ["Object"]
1200
- }),
1201
- smalltalk.ObjectTest);
1202
1375
 
1203
- smalltalk.addMethod(
1204
- unescape('_testNilUndefined'),
1205
- smalltalk.method({
1206
- selector: unescape('testNilUndefined'),
1207
- category: 'tests',
1208
- fn: function () {
1209
- var self=this;
1210
- smalltalk.send(self, "_assert_", [smalltalk.send(nil, "__eq", [(typeof undefined == 'undefined' ? nil : undefined)])]);
1211
- return self;},
1212
- args: [],
1213
- source: unescape('testNilUndefined%0A%09%22nil%20in%20Smalltalk%20is%20the%20undefined%20object%20in%20JS%22%0A%0A%09self%20assert%3A%20nil%20%3D%20undefined'),
1214
- messageSends: ["assert:", unescape("%3D")],
1215
- referencedClasses: []
1216
- }),
1217
- smalltalk.ObjectTest);
1218
1376
 
1377
+ smalltalk.addClass('PackageWithDefaultCommitPathChangedTest', smalltalk.PackageTest, [], 'Kernel-Tests');
1219
1378
  smalltalk.addMethod(
1220
- unescape('_testidentityHash'),
1379
+ "_setUp",
1221
1380
  smalltalk.method({
1222
- selector: unescape('testidentityHash'),
1223
- category: 'tests',
1224
- fn: function () {
1381
+ selector: "setUp",
1382
+ category: 'running',
1383
+ fn: function (){
1225
1384
  var self=this;
1226
- var o1=nil;
1227
- var o2=nil;
1228
- (o1=smalltalk.send((smalltalk.Object || Object), "_new", []));
1229
- (o2=smalltalk.send((smalltalk.Object || Object), "_new", []));
1230
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o1, "_identityHash", []), "__eq_eq", [smalltalk.send(o1, "_identityHash", [])])]);
1231
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(o1, "_identityHash", []), "__eq_eq", [smalltalk.send(o2, "_identityHash", [])])]);
1385
+ smalltalk.send(self, "_setUp", [], smalltalk.PackageWithDefaultCommitPathChangedTest.superclass || nil);
1386
+ (function($rec){smalltalk.send($rec, "_defaultCommitPathJs_", ["javascripts/"]);return smalltalk.send($rec, "_defaultCommitPathSt_", ["smalltalk/"]);})((smalltalk.Package || Package));
1232
1387
  return self;},
1233
1388
  args: [],
1234
- source: unescape('testidentityHash%0A%09%7C%20o1%20o2%20%7C%0A%09%0A%09o1%20%3A%3D%20Object%20new.%0A%09o2%20%3A%3D%20Object%20new.%0A%0A%09self%20assert%3A%20o1%20identityHash%20%3D%3D%20o1%20identityHash.%0A%09self%20deny%3A%20o1%20identityHash%20%3D%3D%20o2%20identityHash'),
1235
- messageSends: ["new", "assert:", unescape("%3D%3D"), "identityHash", "deny:"],
1236
- referencedClasses: ["Object"]
1389
+ source: "setUp\x0a\x09super setUp.\x0a\x0a\x09Package\x0a\x09\x09defaultCommitPathJs: 'javascripts/';\x0a\x09\x09defaultCommitPathSt: 'smalltalk/'.",
1390
+ messageSends: ["setUp", "defaultCommitPathJs:", "defaultCommitPathSt:"],
1391
+ referencedClasses: ["Package"]
1237
1392
  }),
1238
- smalltalk.ObjectTest);
1393
+ smalltalk.PackageWithDefaultCommitPathChangedTest);
1239
1394
 
1240
1395
  smalltalk.addMethod(
1241
- unescape('_testBasicPerform'),
1396
+ "_testGrulCommitPathJsShouldBeServerGrulJs",
1242
1397
  smalltalk.method({
1243
- selector: unescape('testBasicPerform'),
1398
+ selector: "testGrulCommitPathJsShouldBeServerGrulJs",
1244
1399
  category: 'tests',
1245
- fn: function () {
1400
+ fn: function (){
1246
1401
  var self=this;
1247
- var o=nil;
1248
- (o=smalltalk.send((smalltalk.Object || Object), "_new", []));
1249
- smalltalk.send(o, "_basicAt_put_", ["func", (function(){return "hello";})]);
1250
- smalltalk.send(o, "_basicAt_put_", ["func2", (function(a){return ((($receiver = a).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]);
1251
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_basicPerform_", ["func"]), "hello"]);
1252
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_basicPerform_withArguments_", ["func2", [(3)]]), (4)]);
1402
+ smalltalk.send(self, "_assert_equals_", ["server/grul/js", smalltalk.send(self['@grulPackage'], "_commitPathJs", [])]);
1253
1403
  return self;},
1254
1404
  args: [],
1255
- source: unescape('testBasicPerform%0A%09%7C%20o%20%7C%0A%09o%20%3A%3D%20Object%20new.%0A%09o%20basicAt%3A%20%27func%27%20put%3A%20%5B%27hello%27%5D.%09%0A%09o%20basicAt%3A%20%27func2%27%20put%3A%20%5B%3Aa%20%7C%20a%20+%201%5D.%0A%0A%09self%20assert%3A%20%28o%20basicPerform%3A%20%27func%27%29%09%20equals%3A%20%27hello%27.%0A%09self%20assert%3A%20%28o%20basicPerform%3A%20%27func2%27%20withArguments%3A%20%23%283%29%29%20equals%3A%204'),
1256
- messageSends: ["new", "basicAt:put:", unescape("+"), "assert:equals:", "basicPerform:", "basicPerform:withArguments:"],
1257
- referencedClasses: ["Object"]
1405
+ source: "testGrulCommitPathJsShouldBeServerGrulJs\x0a\x09self assert: 'server/grul/js' equals: grulPackage commitPathJs",
1406
+ messageSends: ["assert:equals:", "commitPathJs"],
1407
+ referencedClasses: []
1258
1408
  }),
1259
- smalltalk.ObjectTest);
1409
+ smalltalk.PackageWithDefaultCommitPathChangedTest);
1260
1410
 
1261
1411
  smalltalk.addMethod(
1262
- unescape('_testIfNil'),
1412
+ "_testGrulCommitPathStShouldBeGrulSt",
1263
1413
  smalltalk.method({
1264
- selector: unescape('testIfNil'),
1414
+ selector: "testGrulCommitPathStShouldBeGrulSt",
1265
1415
  category: 'tests',
1266
- fn: function () {
1416
+ fn: function (){
1267
1417
  var self=this;
1268
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send((smalltalk.Object || Object), "_new", []), "_isNil", [])]);
1269
- smalltalk.send(self, "_deny_", [smalltalk.send((($receiver = smalltalk.send((smalltalk.Object || Object), "_new", [])) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver, "__eq", [true])]);
1270
- smalltalk.send(self, "_assert_", [smalltalk.send((($receiver = smalltalk.send((smalltalk.Object || Object), "_new", [])) != nil && $receiver != undefined) ? (function(){return true;})() : nil, "__eq", [true])]);
1271
- smalltalk.send(self, "_assert_", [smalltalk.send((($receiver = smalltalk.send((smalltalk.Object || Object), "_new", [])) == nil || $receiver == undefined) ? (function(){return false;})() : (function(){return true;})(), "__eq", [true])]);
1272
- smalltalk.send(self, "_assert_", [smalltalk.send((($receiver = smalltalk.send((smalltalk.Object || Object), "_new", [])) == nil || $receiver == undefined) ? (function(){return false;})() : (function(){return true;})(), "__eq", [true])]);
1418
+ smalltalk.send(self, "_assert_equals_", ["grul/st", smalltalk.send(self['@grulPackage'], "_commitPathSt", [])]);
1273
1419
  return self;},
1274
1420
  args: [],
1275
- source: unescape('testIfNil%0A%09self%20deny%3A%20Object%20new%20isNil.%0A%09self%20deny%3A%20%28Object%20new%20ifNil%3A%20%5Btrue%5D%29%20%3D%20true.%0A%09self%20assert%3A%20%28Object%20new%20ifNotNil%3A%20%5Btrue%5D%29%20%3D%20true.%0A%0A%09self%20assert%3A%20%28Object%20new%20ifNil%3A%20%5Bfalse%5D%20ifNotNil%3A%20%5Btrue%5D%29%20%3D%20true.%0A%09self%20assert%3A%20%28Object%20new%20ifNotNil%3A%20%5Btrue%5D%20ifNil%3A%20%5Bfalse%5D%29%20%3D%20true'),
1276
- messageSends: ["deny:", "isNil", "new", unescape("%3D"), "ifNil:", "assert:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"],
1277
- referencedClasses: ["Object"]
1421
+ source: "testGrulCommitPathStShouldBeGrulSt\x0a\x09self assert: 'grul/st' equals: grulPackage commitPathSt",
1422
+ messageSends: ["assert:equals:", "commitPathSt"],
1423
+ referencedClasses: []
1278
1424
  }),
1279
- smalltalk.ObjectTest);
1425
+ smalltalk.PackageWithDefaultCommitPathChangedTest);
1280
1426
 
1281
1427
  smalltalk.addMethod(
1282
- unescape('_testInstVars'),
1428
+ "_testZorkCommitPathJsShouldBeJavascript",
1283
1429
  smalltalk.method({
1284
- selector: unescape('testInstVars'),
1430
+ selector: "testZorkCommitPathJsShouldBeJavascript",
1285
1431
  category: 'tests',
1286
- fn: function () {
1432
+ fn: function (){
1287
1433
  var self=this;
1288
- var o=nil;
1289
- (o=smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_new", []));
1290
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_instVarAt_", [smalltalk.symbolFor("foo")]), nil]);
1291
- smalltalk.send(o, "_instVarAt_put_", [smalltalk.symbolFor("foo"), (1)]);
1292
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_instVarAt_", [smalltalk.symbolFor("foo")]), (1)]);
1293
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(o, "_instVarAt_", ["foo"]), (1)]);
1434
+ smalltalk.send(self, "_assert_equals_", ["javascripts/", smalltalk.send(self['@zorkPackage'], "_commitPathJs", [])]);
1294
1435
  return self;},
1295
1436
  args: [],
1296
- source: unescape('testInstVars%0A%09%7C%20o%20%7C%0A%09o%20%3A%3D%20ObjectMock%20new.%0A%09self%20assert%3A%20%28o%20instVarAt%3A%20%23foo%29%20equals%3A%20nil.%0A%0A%09o%20instVarAt%3A%20%23foo%20put%3A%201.%0A%09self%20assert%3A%20%28o%20instVarAt%3A%20%23foo%29%20equals%3A%201.%0A%09self%20assert%3A%20%28o%20instVarAt%3A%20%27foo%27%29%20equals%3A%201'),
1297
- messageSends: ["new", "assert:equals:", "instVarAt:", "instVarAt:put:"],
1298
- referencedClasses: ["ObjectMock"]
1437
+ source: "testZorkCommitPathJsShouldBeJavascript\x0a\x09self assert: 'javascripts/' equals: zorkPackage commitPathJs",
1438
+ messageSends: ["assert:equals:", "commitPathJs"],
1439
+ referencedClasses: []
1299
1440
  }),
1300
- smalltalk.ObjectTest);
1441
+ smalltalk.PackageWithDefaultCommitPathChangedTest);
1301
1442
 
1302
1443
  smalltalk.addMethod(
1303
- unescape('_testYourself'),
1444
+ "_testZorkCommitPathStShouldBeSmalltalk",
1304
1445
  smalltalk.method({
1305
- selector: unescape('testYourself'),
1446
+ selector: "testZorkCommitPathStShouldBeSmalltalk",
1306
1447
  category: 'tests',
1307
- fn: function () {
1448
+ fn: function (){
1308
1449
  var self=this;
1309
- var o=nil;
1310
- (o=smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_new", []));
1311
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(o, "_yourself", []), "__eq_eq", [o])]);
1450
+ smalltalk.send(self, "_assert_equals_", ["smalltalk/", smalltalk.send(self['@zorkPackage'], "_commitPathSt", [])]);
1312
1451
  return self;},
1313
1452
  args: [],
1314
- source: unescape('testYourself%0A%09%7C%20o%20%7C%0A%09o%20%3A%3D%20ObjectMock%20new.%0A%09self%20assert%3A%20o%20yourself%20%3D%3D%20o'),
1315
- messageSends: ["new", "assert:", unescape("%3D%3D"), "yourself"],
1316
- referencedClasses: ["ObjectMock"]
1453
+ source: "testZorkCommitPathStShouldBeSmalltalk\x0a\x09self assert: 'smalltalk/' equals: zorkPackage commitPathSt",
1454
+ messageSends: ["assert:equals:", "commitPathSt"],
1455
+ referencedClasses: []
1317
1456
  }),
1318
- smalltalk.ObjectTest);
1457
+ smalltalk.PackageWithDefaultCommitPathChangedTest);
1458
+
1319
1459
 
1320
1460
  smalltalk.addMethod(
1321
- unescape('_testDNU'),
1461
+ "_shouldInheritSelectors",
1322
1462
  smalltalk.method({
1323
- selector: unescape('testDNU'),
1324
- category: 'tests',
1325
- fn: function () {
1463
+ selector: "shouldInheritSelectors",
1464
+ category: 'accessing',
1465
+ fn: function (){
1326
1466
  var self=this;
1327
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(smalltalk.send((smalltalk.Object || Object), "_new", []), "_foo", []);}), (smalltalk.MessageNotUnderstood || MessageNotUnderstood)]);
1467
+ return false;
1328
1468
  return self;},
1329
1469
  args: [],
1330
- source: unescape('testDNU%0A%09self%20should%3A%20%5BObject%20new%20foo%5D%20raise%3A%20MessageNotUnderstood'),
1331
- messageSends: ["should:raise:", "foo", "new"],
1332
- referencedClasses: ["Object", "MessageNotUnderstood"]
1470
+ source: "shouldInheritSelectors\x0a\x09^ false",
1471
+ messageSends: [],
1472
+ referencedClasses: []
1333
1473
  }),
1334
- smalltalk.ObjectTest);
1335
-
1474
+ smalltalk.PackageWithDefaultCommitPathChangedTest.klass);
1336
1475
 
1337
1476
 
1338
- smalltalk.addClass('SymbolTest', smalltalk.TestCase, [], 'Kernel-Tests');
1477
+ smalltalk.addClass('PointTest', smalltalk.TestCase, [], 'Kernel-Tests');
1339
1478
  smalltalk.addMethod(
1340
- unescape('_testEquality'),
1479
+ "_testAccessing",
1341
1480
  smalltalk.method({
1342
- selector: unescape('testEquality'),
1481
+ selector: "testAccessing",
1343
1482
  category: 'tests',
1344
- fn: function () {
1483
+ fn: function (){
1345
1484
  var self=this;
1346
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", [smalltalk.symbolFor("hello")])]);
1347
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", [smalltalk.symbolFor("world")])]);
1348
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", [smalltalk.send(smalltalk.symbolFor("hello"), "_yourself", [])])]);
1349
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_yourself", []), "__eq", [smalltalk.symbolFor("hello")])]);
1350
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", ["hello"])]);
1351
- smalltalk.send(self, "_deny_", [smalltalk.send("hello", "__eq", [smalltalk.symbolFor("hello")])]);
1485
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Point || Point), "_x_y_", [(3), (4)]), "_x", []), (3)]);
1486
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Point || Point), "_x_y_", [(3), (4)]), "_y", []), (4)]);
1487
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Point || Point), "_new", []), "_x_", [(3)]), "_x", []), (3)]);
1488
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Point || Point), "_new", []), "_y_", [(4)]), "_y", []), (4)]);
1352
1489
  return self;},
1353
1490
  args: [],
1354
- source: unescape('testEquality%0A%09self%20assert%3A%20%23hello%20%3D%20%23hello.%0A%09self%20deny%3A%20%23hello%20%3D%20%23world.%0A%0A%09self%20assert%3A%20%23hello%20%20%3D%20%23hello%20yourself.%0A%09self%20assert%3A%20%23hello%20yourself%20%3D%20%23hello.%0A%0A%09self%20deny%3A%20%23hello%20%20%3D%20%27hello%27.%0A%09self%20deny%3A%20%27hello%27%20%3D%20%23hello.'),
1355
- messageSends: ["assert:", unescape("%3D"), "deny:", "yourself"],
1356
- referencedClasses: []
1491
+ 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",
1492
+ messageSends: ["assert:equals:", "x", "x:y:", "y", "x:", "new", "y:"],
1493
+ referencedClasses: ["Point"]
1357
1494
  }),
1358
- smalltalk.SymbolTest);
1495
+ smalltalk.PointTest);
1359
1496
 
1360
1497
  smalltalk.addMethod(
1361
- unescape('_testAt'),
1498
+ "_testArithmetic",
1362
1499
  smalltalk.method({
1363
- selector: unescape('testAt'),
1500
+ selector: "testArithmetic",
1364
1501
  category: 'tests',
1365
- fn: function () {
1502
+ fn: function (){
1366
1503
  var self=this;
1367
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_at_", [(1)]), "__eq", ["h"])]);
1368
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_at_", [(5)]), "__eq", ["o"])]);
1369
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_at_ifAbsent_", [(6), (function(){return nil;})]), "__eq", [nil])]);
1504
+ smalltalk.send(self, "_assert_equals_", [((($receiver = smalltalk.send((3), "__at", [(4)])).klass === smalltalk.Number) ? $receiver *smalltalk.send((3), "__at", [(4)]) : smalltalk.send($receiver, "__star", [smalltalk.send((3), "__at", [(4)])])), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(9), (16)])]);
1505
+ smalltalk.send(self, "_assert_equals_", [((($receiver = smalltalk.send((3), "__at", [(4)])).klass === smalltalk.Number) ? $receiver +smalltalk.send((3), "__at", [(4)]) : smalltalk.send($receiver, "__plus", [smalltalk.send((3), "__at", [(4)])])), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(6), (8)])]);
1506
+ smalltalk.send(self, "_assert_equals_", [((($receiver = smalltalk.send((3), "__at", [(4)])).klass === smalltalk.Number) ? $receiver -smalltalk.send((3), "__at", [(4)]) : smalltalk.send($receiver, "__minus", [smalltalk.send((3), "__at", [(4)])])), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(0), (0)])]);
1507
+ smalltalk.send(self, "_assert_equals_", [((($receiver = smalltalk.send((6), "__at", [(8)])).klass === smalltalk.Number) ? $receiver /smalltalk.send((3), "__at", [(4)]) : smalltalk.send($receiver, "__slash", [smalltalk.send((3), "__at", [(4)])])), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(2), (2)])]);
1370
1508
  return self;},
1371
1509
  args: [],
1372
- source: unescape('testAt%0A%09self%20assert%3A%20%28%23hello%20at%3A%201%29%20%3D%20%27h%27.%0A%09self%20assert%3A%20%28%23hello%20at%3A%205%29%20%3D%20%27o%27.%0A%09self%20assert%3A%20%28%23hello%20at%3A%206%20ifAbsent%3A%20%5Bnil%5D%29%20%3D%20nil'),
1373
- messageSends: ["assert:", unescape("%3D"), "at:", "at:ifAbsent:"],
1374
- referencedClasses: []
1510
+ 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)",
1511
+ messageSends: ["assert:equals:", "*", "@", "x:y:", "+", "-", "/"],
1512
+ referencedClasses: ["Point"]
1375
1513
  }),
1376
- smalltalk.SymbolTest);
1514
+ smalltalk.PointTest);
1377
1515
 
1378
1516
  smalltalk.addMethod(
1379
- unescape('_testAtPut'),
1517
+ "_testAt",
1380
1518
  smalltalk.method({
1381
- selector: unescape('testAtPut'),
1519
+ selector: "testAt",
1382
1520
  category: 'tests',
1383
- fn: function () {
1521
+ fn: function (){
1384
1522
  var self=this;
1385
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send("hello", "_at_put_", [(1), "a"]);}), (smalltalk.Error || Error)]);
1523
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((3), "__at", [(4)]), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(3), (4)])]);
1386
1524
  return self;},
1387
1525
  args: [],
1388
- source: unescape('testAtPut%0A%09%22Symbol%20instances%20are%20read-only%22%0A%09self%20should%3A%20%5B%27hello%27%20at%3A%201%20put%3A%20%27a%27%5D%20raise%3A%20Error'),
1389
- messageSends: ["should:raise:", "at:put:"],
1390
- referencedClasses: ["Error"]
1526
+ source: "testAt\x0a\x09self assert: 3@4 equals: (Point x: 3 y: 4)",
1527
+ messageSends: ["assert:equals:", "@", "x:y:"],
1528
+ referencedClasses: ["Point"]
1391
1529
  }),
1392
- smalltalk.SymbolTest);
1530
+ smalltalk.PointTest);
1393
1531
 
1394
1532
  smalltalk.addMethod(
1395
- unescape('_testIdentity'),
1533
+ "_testEgality",
1396
1534
  smalltalk.method({
1397
- selector: unescape('testIdentity'),
1535
+ selector: "testEgality",
1398
1536
  category: 'tests',
1399
- fn: function () {
1537
+ fn: function (){
1400
1538
  var self=this;
1401
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq_eq", [smalltalk.symbolFor("hello")])]);
1402
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq_eq", [smalltalk.symbolFor("world")])]);
1403
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", [smalltalk.send(smalltalk.symbolFor("hello"), "_yourself", [])])]);
1404
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_yourself", []), "__eq", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_asString", []), "_asSymbol", [])])]);
1539
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3), "__at", [(4)]), "__eq", [smalltalk.send((3), "__at", [(4)])])]);
1540
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send((3), "__at", [(5)]), "__eq", [smalltalk.send((3), "__at", [(6)])])]);
1405
1541
  return self;},
1406
1542
  args: [],
1407
- source: unescape('testIdentity%0A%09self%20assert%3A%20%23hello%20%3D%3D%20%23hello.%0A%09self%20deny%3A%20%23hello%20%3D%3D%20%23world.%0A%0A%09self%20assert%3A%20%23hello%20%20%3D%20%23hello%20yourself.%0A%09self%20assert%3A%20%23hello%20yourself%20%3D%20%23hello%20asString%20asSymbol'),
1408
- messageSends: ["assert:", unescape("%3D%3D"), "deny:", unescape("%3D"), "yourself", "asSymbol", "asString"],
1543
+ source: "testEgality\x0a\x09self assert: 3@4 = (3@4).\x0a\x09self deny: 3@5 = (3@6)",
1544
+ messageSends: ["assert:", "=", "@", "deny:"],
1409
1545
  referencedClasses: []
1410
1546
  }),
1411
- smalltalk.SymbolTest);
1547
+ smalltalk.PointTest);
1412
1548
 
1413
1549
  smalltalk.addMethod(
1414
- unescape('_testComparing'),
1550
+ "_testTranslateBy",
1415
1551
  smalltalk.method({
1416
- selector: unescape('testComparing'),
1552
+ selector: "testTranslateBy",
1417
1553
  category: 'tests',
1418
- fn: function () {
1554
+ fn: function (){
1419
1555
  var self=this;
1420
- smalltalk.send(self, "_assert_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver >smalltalk.symbolFor("aa") : smalltalk.send($receiver, "__gt", [smalltalk.symbolFor("aa")]))]);
1421
- smalltalk.send(self, "_deny_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver >smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__gt", [smalltalk.symbolFor("ba")]))]);
1422
- smalltalk.send(self, "_assert_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver <smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__lt", [smalltalk.symbolFor("ba")]))]);
1423
- smalltalk.send(self, "_deny_", [((($receiver = smalltalk.symbolFor("bb")).klass === smalltalk.Number) ? $receiver <smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__lt", [smalltalk.symbolFor("ba")]))]);
1424
- smalltalk.send(self, "_assert_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver >=smalltalk.symbolFor("aa") : smalltalk.send($receiver, "__gt_eq", [smalltalk.symbolFor("aa")]))]);
1425
- smalltalk.send(self, "_deny_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver >=smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__gt_eq", [smalltalk.symbolFor("ba")]))]);
1426
- smalltalk.send(self, "_assert_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver <=smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__lt_eq", [smalltalk.symbolFor("ba")]))]);
1427
- smalltalk.send(self, "_deny_", [((($receiver = smalltalk.symbolFor("bb")).klass === smalltalk.Number) ? $receiver <=smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__lt_eq", [smalltalk.symbolFor("ba")]))]);
1556
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((3), "__at", [(4)]), smalltalk.send(smalltalk.send((3), "__at", [(3)]), "_translateBy_", [smalltalk.send((0), "__at", [(1)])])]);
1557
+ 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", [])])])]);
1558
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send((5), "__at", [(6)]), smalltalk.send(smalltalk.send((3), "__at", [(3)]), "_translateBy_", [smalltalk.send((2), "__at", [(3)])])]);
1559
+ 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)])])]);
1428
1560
  return self;},
1429
1561
  args: [],
1430
- source: unescape('testComparing%0A%09self%20assert%3A%20%23ab%20%3E%20%23aa.%0A%09self%20deny%3A%20%23ab%20%3E%20%23ba.%0A%0A%09self%20assert%3A%20%23ab%20%3C%20%23ba.%0A%09self%20deny%3A%20%23bb%20%3C%20%23ba.%0A%0A%09self%20assert%3A%20%23ab%20%3E%3D%20%23aa.%0A%09self%20deny%3A%20%23ab%20%3E%3D%20%23ba.%0A%0A%09self%20assert%3A%20%23ab%20%3C%3D%20%23ba.%0A%09self%20deny%3A%20%23bb%20%3C%3D%20%23ba'),
1431
- messageSends: ["assert:", unescape("%3E"), "deny:", unescape("%3C"), unescape("%3E%3D"), unescape("%3C%3D")],
1562
+ 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).",
1563
+ messageSends: ["assert:equals:", "@", "translateBy:", "negated"],
1432
1564
  referencedClasses: []
1433
1565
  }),
1434
- smalltalk.SymbolTest);
1566
+ smalltalk.PointTest);
1567
+
1568
+
1435
1569
 
1570
+ smalltalk.addClass('RandomTest', smalltalk.TestCase, [], 'Kernel-Tests');
1436
1571
  smalltalk.addMethod(
1437
- unescape('_testSize'),
1572
+ "_textNext",
1438
1573
  smalltalk.method({
1439
- selector: unescape('testSize'),
1574
+ selector: "textNext",
1440
1575
  category: 'tests',
1441
- fn: function () {
1576
+ fn: function (){
1442
1577
  var self=this;
1443
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.symbolFor("a"), "_size", []), (1)]);
1444
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.symbolFor("aaaaa"), "_size", []), (5)]);
1578
+ smalltalk.send((10000), "_timesRepeat_", [(function(){var current=nil;
1579
+ var next=nil;
1580
+ (next=smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", []));smalltalk.send(self, "_assert_", [((($receiver = next).klass === smalltalk.Number) ? $receiver >=(0) : smalltalk.send($receiver, "__gt_eq", [(0)]))]);smalltalk.send(self, "_assert_", [((($receiver = next).klass === smalltalk.Number) ? $receiver <(1) : smalltalk.send($receiver, "__lt", [(1)]))]);smalltalk.send(self, "_deny_", [smalltalk.send(current, "__eq", [next])]);return smalltalk.send(next, "__eq", [current]);})]);
1445
1581
  return self;},
1446
1582
  args: [],
1447
- source: unescape('testSize%0A%09self%20assert%3A%20%23a%20size%20equals%3A%201.%0A%09self%20assert%3A%20%23aaaaa%20size%20equals%3A%205'),
1448
- messageSends: ["assert:equals:", "size"],
1449
- referencedClasses: []
1583
+ 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]",
1584
+ messageSends: ["timesRepeat:", "next", "new", "assert:", ">=", "<", "deny:", "="],
1585
+ referencedClasses: ["Random"]
1450
1586
  }),
1451
- smalltalk.SymbolTest);
1587
+ smalltalk.RandomTest);
1452
1588
 
1589
+
1590
+
1591
+ smalltalk.addClass('SetTest', smalltalk.TestCase, [], 'Kernel-Tests');
1453
1592
  smalltalk.addMethod(
1454
- unescape('_testAsString'),
1593
+ "_testAddRemove",
1455
1594
  smalltalk.method({
1456
- selector: unescape('testAsString'),
1595
+ selector: "testAddRemove",
1457
1596
  category: 'tests',
1458
- fn: function () {
1597
+ fn: function (){
1459
1598
  var self=this;
1460
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.symbolFor("hello"), "_asString", []), "hello"]);
1599
+ var set=nil;
1600
+ (set=smalltalk.send((smalltalk.Set || Set), "_new", []));
1601
+ smalltalk.send(self, "_assert_", [smalltalk.send(set, "_isEmpty", [])]);
1602
+ smalltalk.send(set, "_add_", [(3)]);
1603
+ smalltalk.send(self, "_assert_", [smalltalk.send(set, "_includes_", [(3)])]);
1604
+ smalltalk.send(set, "_add_", [(5)]);
1605
+ smalltalk.send(self, "_assert_", [smalltalk.send(set, "_includes_", [(5)])]);
1606
+ smalltalk.send(set, "_remove_", [(3)]);
1607
+ smalltalk.send(self, "_deny_", [smalltalk.send(set, "_includes_", [(3)])]);
1461
1608
  return self;},
1462
1609
  args: [],
1463
- source: unescape('testAsString%0A%09self%20assert%3A%20%23hello%20asString%20equals%3A%20%27hello%27'),
1464
- messageSends: ["assert:equals:", "asString"],
1465
- referencedClasses: []
1610
+ 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)",
1611
+ messageSends: ["new", "assert:", "isEmpty", "add:", "includes:", "remove:", "deny:"],
1612
+ referencedClasses: ["Set"]
1466
1613
  }),
1467
- smalltalk.SymbolTest);
1614
+ smalltalk.SetTest);
1468
1615
 
1469
1616
  smalltalk.addMethod(
1470
- unescape('_testAsSymbol'),
1617
+ "_testAt",
1471
1618
  smalltalk.method({
1472
- selector: unescape('testAsSymbol'),
1619
+ selector: "testAt",
1473
1620
  category: 'tests',
1474
- fn: function () {
1621
+ fn: function (){
1475
1622
  var self=this;
1476
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq_eq", [smalltalk.send(smalltalk.symbolFor("hello"), "_asSymbol", [])])]);
1623
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(smalltalk.send((smalltalk.Set || Set), "_new", []), "_at_put_", [(1), (2)]);}), (smalltalk.Error || Error)]);
1477
1624
  return self;},
1478
1625
  args: [],
1479
- source: unescape('testAsSymbol%0A%09self%20assert%3A%20%23hello%20%3D%3D%20%23hello%20asSymbol'),
1480
- messageSends: ["assert:", unescape("%3D%3D"), "asSymbol"],
1481
- referencedClasses: []
1626
+ source: "testAt\x0a\x09self should: [Set new at: 1 put: 2] raise: Error",
1627
+ messageSends: ["should:raise:", "at:put:", "new"],
1628
+ referencedClasses: ["Set", "Error"]
1482
1629
  }),
1483
- smalltalk.SymbolTest);
1630
+ smalltalk.SetTest);
1484
1631
 
1485
1632
  smalltalk.addMethod(
1486
- unescape('_testCopying'),
1633
+ "_testSize",
1487
1634
  smalltalk.method({
1488
- selector: unescape('testCopying'),
1635
+ selector: "testSize",
1489
1636
  category: 'tests',
1490
- fn: function () {
1637
+ fn: function (){
1491
1638
  var self=this;
1492
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_copy", []), "__eq_eq", [smalltalk.symbolFor("hello")])]);
1493
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_deepCopy", []), "__eq_eq", [smalltalk.symbolFor("hello")])]);
1639
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Set || Set), "_new", []), "_size", []), (0)]);
1640
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Set || Set), "_withAll_", [[(1), (2), (3), (4)]]), "_size", []), (4)]);
1641
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Set || Set), "_withAll_", [[(1), (1), (1), (1)]]), "_size", []), (1)]);
1494
1642
  return self;},
1495
1643
  args: [],
1496
- source: unescape('testCopying%0A%09self%20assert%3A%20%23hello%20copy%20%3D%3D%20%23hello.%0A%09self%20assert%3A%20%23hello%20deepCopy%20%3D%3D%20%23hello'),
1497
- messageSends: ["assert:", unescape("%3D%3D"), "copy", "deepCopy"],
1498
- referencedClasses: []
1644
+ 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",
1645
+ messageSends: ["assert:equals:", "size", "new", "withAll:"],
1646
+ referencedClasses: ["Set"]
1499
1647
  }),
1500
- smalltalk.SymbolTest);
1648
+ smalltalk.SetTest);
1501
1649
 
1502
1650
  smalltalk.addMethod(
1503
- unescape('_testIsSymbolIsString'),
1651
+ "_testUnicity",
1504
1652
  smalltalk.method({
1505
- selector: unescape('testIsSymbolIsString'),
1653
+ selector: "testUnicity",
1506
1654
  category: 'tests',
1507
- fn: function () {
1655
+ fn: function (){
1508
1656
  var self=this;
1509
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "_isSymbol", [])]);
1510
- smalltalk.send(self, "_deny_", [smalltalk.send("hello", "_isSymbol", [])]);
1511
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.symbolFor("hello"), "_isString", [])]);
1512
- smalltalk.send(self, "_assert_", [smalltalk.send("hello", "_isString", [])]);
1657
+ var set=nil;
1658
+ (set=smalltalk.send((smalltalk.Set || Set), "_new", []));
1659
+ smalltalk.send(set, "_add_", [(21)]);
1660
+ smalltalk.send(set, "_add_", ["hello"]);
1661
+ smalltalk.send(set, "_add_", [(21)]);
1662
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(set, "_size", []), "__eq", [(2)])]);
1663
+ smalltalk.send(set, "_add_", ["hello"]);
1664
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(set, "_size", []), "__eq", [(2)])]);
1665
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(set, "_asArray", []), [(21), "hello"]]);
1513
1666
  return self;},
1514
1667
  args: [],
1515
- source: unescape('testIsSymbolIsString%0A%09self%20assert%3A%20%23hello%20isSymbol.%0A%09self%20deny%3A%20%27hello%27%20isSymbol.%0A%09self%20deny%3A%20%23hello%20isString.%0A%09self%20assert%3A%20%27hello%27%20isString'),
1516
- messageSends: ["assert:", "isSymbol", "deny:", "isString"],
1517
- referencedClasses: []
1668
+ 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')",
1669
+ messageSends: ["new", "add:", "assert:", "=", "size", "assert:equals:", "asArray"],
1670
+ referencedClasses: ["Set"]
1518
1671
  }),
1519
- smalltalk.SymbolTest);
1672
+ smalltalk.SetTest);
1520
1673
 
1521
1674
 
1522
1675
 
1523
- smalltalk.addClass('ObjectMock', smalltalk.Object, ['foo', 'bar'], 'Kernel-Tests');
1676
+ smalltalk.addClass('StringTest', smalltalk.TestCase, [], 'Kernel-Tests');
1524
1677
  smalltalk.addMethod(
1525
- unescape('_foo'),
1678
+ "_testAddRemove",
1526
1679
  smalltalk.method({
1527
- selector: unescape('foo'),
1528
- category: 'not yet classified',
1529
- fn: function () {
1680
+ selector: "testAddRemove",
1681
+ category: 'tests',
1682
+ fn: function (){
1530
1683
  var self=this;
1531
- return self['@foo'];
1684
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send("hello", "_add_", ["a"]);}), (smalltalk.Error || Error)]);
1685
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send("hello", "_remove_", ["h"]);}), (smalltalk.Error || Error)]);
1532
1686
  return self;},
1533
1687
  args: [],
1534
- source: unescape('foo%0A%09%5Efoo'),
1535
- messageSends: [],
1536
- referencedClasses: []
1537
- }),
1538
- smalltalk.ObjectMock);
1539
-
1540
- smalltalk.addMethod(
1541
- unescape('_foo_'),
1542
- smalltalk.method({
1543
- selector: unescape('foo%3A'),
1544
- category: 'not yet classified',
1545
- fn: function (anObject) {
1546
- var self=this;
1547
- (self['@foo']=anObject);
1548
- return self;},
1549
- args: ["anObject"],
1550
- source: unescape('foo%3A%20anObject%0A%09foo%20%3A%3D%20anObject'),
1551
- messageSends: [],
1552
- referencedClasses: []
1688
+ source: "testAddRemove\x0a\x09self should: ['hello' add: 'a'] raise: Error.\x0a\x09self should: ['hello' remove: 'h'] raise: Error",
1689
+ messageSends: ["should:raise:", "add:", "remove:"],
1690
+ referencedClasses: ["Error"]
1553
1691
  }),
1554
- smalltalk.ObjectMock);
1555
-
1556
-
1692
+ smalltalk.StringTest);
1557
1693
 
1558
- smalltalk.addClass('UndefinedTest', smalltalk.TestCase, [], 'Kernel-Tests');
1559
1694
  smalltalk.addMethod(
1560
- unescape('_testIsNil'),
1695
+ "_testAsArray",
1561
1696
  smalltalk.method({
1562
- selector: unescape('testIsNil'),
1697
+ selector: "testAsArray",
1563
1698
  category: 'tests',
1564
- fn: function () {
1699
+ fn: function (){
1565
1700
  var self=this;
1566
- smalltalk.send(self, "_assert_", [smalltalk.send(nil, "_isNil", [])]);
1567
- smalltalk.send(self, "_deny_", [smalltalk.send(nil, "_notNil", [])]);
1701
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_asArray", []), "__eq", [["h", "e", "l", "l", "o"]])]);
1568
1702
  return self;},
1569
1703
  args: [],
1570
- source: unescape('testIsNil%0A%09self%20assert%3A%20nil%20isNil.%0A%09self%20deny%3A%20nil%20notNil.'),
1571
- messageSends: ["assert:", "isNil", "deny:", "notNil"],
1704
+ source: "testAsArray\x0a\x09self assert: 'hello' asArray = #('h' 'e' 'l' 'l' 'o').",
1705
+ messageSends: ["assert:", "=", "asArray"],
1572
1706
  referencedClasses: []
1573
1707
  }),
1574
- smalltalk.UndefinedTest);
1708
+ smalltalk.StringTest);
1575
1709
 
1576
1710
  smalltalk.addMethod(
1577
- unescape('_testIfNil'),
1711
+ "_testAt",
1578
1712
  smalltalk.method({
1579
- selector: unescape('testIfNil'),
1713
+ selector: "testAt",
1580
1714
  category: 'tests',
1581
- fn: function () {
1715
+ fn: function (){
1582
1716
  var self=this;
1583
- smalltalk.send(self, "_assert_equals_", [(($receiver = nil) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver, true]);
1584
- smalltalk.send(self, "_deny_", [smalltalk.send((($receiver = nil) != nil && $receiver != undefined) ? (function(){return true;})() : nil, "__eq", [true])]);
1585
- smalltalk.send(self, "_assert_equals_", [(($receiver = nil) == nil || $receiver == undefined) ? (function(){return true;})() : (function(){return false;})(), true]);
1586
- smalltalk.send(self, "_deny_", [smalltalk.send((($receiver = nil) == nil || $receiver == undefined) ? (function(){return false;})() : (function(){return true;})(), "__eq", [true])]);
1717
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_at_", [(1)]), "__eq", ["h"])]);
1718
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_at_", [(5)]), "__eq", ["o"])]);
1719
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_at_ifAbsent_", [(6), (function(){return nil;})]), "__eq", [nil])]);
1587
1720
  return self;},
1588
1721
  args: [],
1589
- source: unescape('testIfNil%0A%09self%20assert%3A%20%28nil%20ifNil%3A%20%5Btrue%5D%29%20equals%3A%20true.%0A%09self%20deny%3A%20%28nil%20ifNotNil%3A%20%5Btrue%5D%29%20%3D%20true.%0A%09self%20assert%3A%20%28nil%20ifNil%3A%20%5Btrue%5D%20ifNotNil%3A%20%5Bfalse%5D%29%20equals%3A%20true.%0A%09self%20deny%3A%20%28nil%20ifNotNil%3A%20%5Btrue%5D%20ifNil%3A%20%5Bfalse%5D%29%20%3D%20true'),
1590
- messageSends: ["assert:equals:", "ifNil:", "deny:", unescape("%3D"), "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"],
1722
+ 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",
1723
+ messageSends: ["assert:", "=", "at:", "at:ifAbsent:"],
1591
1724
  referencedClasses: []
1592
1725
  }),
1593
- smalltalk.UndefinedTest);
1726
+ smalltalk.StringTest);
1594
1727
 
1595
1728
  smalltalk.addMethod(
1596
- unescape('_testCopying'),
1729
+ "_testAtPut",
1597
1730
  smalltalk.method({
1598
- selector: unescape('testCopying'),
1731
+ selector: "testAtPut",
1599
1732
  category: 'tests',
1600
- fn: function () {
1733
+ fn: function (){
1601
1734
  var self=this;
1602
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(nil, "_copy", []), nil]);
1735
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send("hello", "_at_put_", [(1), "a"]);}), (smalltalk.Error || Error)]);
1603
1736
  return self;},
1604
1737
  args: [],
1605
- source: unescape('testCopying%0A%09self%20assert%3A%20nil%20copy%20equals%3A%20nil'),
1606
- messageSends: ["assert:equals:", "copy"],
1607
- referencedClasses: []
1738
+ source: "testAtPut\x0a\x09\x22String instances are read-only\x22\x0a\x09self should: ['hello' at: 1 put: 'a'] raise: Error",
1739
+ messageSends: ["should:raise:", "at:put:"],
1740
+ referencedClasses: ["Error"]
1608
1741
  }),
1609
- smalltalk.UndefinedTest);
1742
+ smalltalk.StringTest);
1610
1743
 
1611
1744
  smalltalk.addMethod(
1612
- unescape('_testDeepCopy'),
1745
+ "_testCopyWithoutAll",
1613
1746
  smalltalk.method({
1614
- selector: unescape('testDeepCopy'),
1747
+ selector: "testCopyWithoutAll",
1615
1748
  category: 'tests',
1616
- fn: function () {
1749
+ fn: function (){
1617
1750
  var self=this;
1618
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(nil, "_deepCopy", []), "__eq", [nil])]);
1751
+ smalltalk.send(self, "_assert_equals_", ["hello world", smalltalk.send("*hello* *world*", "_copyWithoutAll_", ["*"])]);
1619
1752
  return self;},
1620
1753
  args: [],
1621
- source: unescape('testDeepCopy%0A%09self%20assert%3A%20nil%20deepCopy%20%3D%20nil'),
1622
- messageSends: ["assert:", unescape("%3D"), "deepCopy"],
1754
+ source: "testCopyWithoutAll\x0a\x09self \x0a\x09\x09assert: 'hello world' \x0a\x09\x09equals: ('*hello* *world*' copyWithoutAll: '*')",
1755
+ messageSends: ["assert:equals:", "copyWithoutAll:"],
1623
1756
  referencedClasses: []
1624
1757
  }),
1625
- smalltalk.UndefinedTest);
1626
-
1627
-
1758
+ smalltalk.StringTest);
1628
1759
 
1629
- smalltalk.addClass('PointTest', smalltalk.TestCase, [], 'Kernel-Tests');
1630
1760
  smalltalk.addMethod(
1631
- unescape('_testAccessing'),
1761
+ "_testEquality",
1632
1762
  smalltalk.method({
1633
- selector: unescape('testAccessing'),
1763
+ selector: "testEquality",
1634
1764
  category: 'tests',
1635
- fn: function () {
1765
+ fn: function (){
1636
1766
  var self=this;
1637
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Point || Point), "_x_y_", [(3), (4)]), "_x", []), (3)]);
1638
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Point || Point), "_x_y_", [(3), (4)]), "_y", []), (4)]);
1639
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Point || Point), "_new", []), "_x_", [(3)]), "_x", []), (3)]);
1640
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Point || Point), "_new", []), "_y_", [(4)]), "_y", []), (4)]);
1767
+ smalltalk.send(self, "_assert_", [smalltalk.send("hello", "__eq", ["hello"])]);
1768
+ smalltalk.send(self, "_deny_", [smalltalk.send("hello", "__eq", ["world"])]);
1769
+ smalltalk.send(self, "_assert_", [smalltalk.send("hello", "__eq", [smalltalk.send("hello", "_yourself", [])])]);
1770
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_yourself", []), "__eq", ["hello"])]);
1771
+ smalltalk.send(self, "_deny_", [smalltalk.send("", "__eq", [(0)])]);
1641
1772
  return self;},
1642
1773
  args: [],
1643
- source: unescape('testAccessing%0A%09self%20assert%3A%20%28Point%20x%3A%203%20y%3A%204%29%20x%20equals%3A%203.%0A%09self%20assert%3A%20%28Point%20x%3A%203%20y%3A%204%29%20y%20equals%3A%204.%0A%09self%20assert%3A%20%28Point%20new%20x%3A%203%29%20x%20equals%3A%203.%0A%09self%20assert%3A%20%28Point%20new%20y%3A%204%29%20y%20equals%3A%204'),
1644
- messageSends: ["assert:equals:", "x", "x:y:", "y", "x:", "new", "y:"],
1645
- referencedClasses: ["Point"]
1774
+ 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",
1775
+ messageSends: ["assert:", "=", "deny:", "yourself"],
1776
+ referencedClasses: []
1646
1777
  }),
1647
- smalltalk.PointTest);
1778
+ smalltalk.StringTest);
1648
1779
 
1649
1780
  smalltalk.addMethod(
1650
- unescape('_testAt'),
1781
+ "_testIdentity",
1651
1782
  smalltalk.method({
1652
- selector: unescape('testAt'),
1783
+ selector: "testIdentity",
1653
1784
  category: 'tests',
1654
- fn: function () {
1785
+ fn: function (){
1655
1786
  var self=this;
1656
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((3), "__at", [(4)]), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(3), (4)])]);
1787
+ smalltalk.send(self, "_assert_", [smalltalk.send("hello", "__eq_eq", ["hello"])]);
1788
+ smalltalk.send(self, "_deny_", [smalltalk.send("hello", "__eq_eq", ["world"])]);
1789
+ smalltalk.send(self, "_assert_", [smalltalk.send("hello", "__eq_eq", [smalltalk.send("hello", "_yourself", [])])]);
1790
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send("hello", "_yourself", []), "__eq_eq", ["hello"])]);
1791
+ smalltalk.send(self, "_deny_", [smalltalk.send("", "__eq_eq", [(0)])]);
1657
1792
  return self;},
1658
1793
  args: [],
1659
- source: unescape('testAt%0A%09self%20assert%3A%203@4%20equals%3A%20%28Point%20x%3A%203%20y%3A%204%29'),
1660
- messageSends: ["assert:equals:", unescape("@"), "x:y:"],
1661
- referencedClasses: ["Point"]
1794
+ 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",
1795
+ messageSends: ["assert:", "==", "deny:", "yourself"],
1796
+ referencedClasses: []
1662
1797
  }),
1663
- smalltalk.PointTest);
1798
+ smalltalk.StringTest);
1664
1799
 
1665
1800
  smalltalk.addMethod(
1666
- unescape('_testEgality'),
1801
+ "_testIncludesSubString",
1667
1802
  smalltalk.method({
1668
- selector: unescape('testEgality'),
1803
+ selector: "testIncludesSubString",
1669
1804
  category: 'tests',
1670
- fn: function () {
1805
+ fn: function (){
1671
1806
  var self=this;
1672
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((3), "__at", [(4)]), "__eq", [smalltalk.send((3), "__at", [(4)])])]);
1673
- smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send((3), "__at", [(5)]), "__eq", [smalltalk.send((3), "__at", [(6)])])]);
1807
+ smalltalk.send(self, "_assert_", [smalltalk.send("amber", "_includesSubString_", ["ber"])]);
1808
+ smalltalk.send(self, "_deny_", [smalltalk.send("amber", "_includesSubString_", ["zork"])]);
1674
1809
  return self;},
1675
1810
  args: [],
1676
- source: unescape('testEgality%0A%09self%20assert%3A%203@4%20%3D%20%283@4%29.%0A%09self%20deny%3A%203@5%20%3D%20%283@6%29'),
1677
- messageSends: ["assert:", unescape("%3D"), unescape("@"), "deny:"],
1811
+ source: "testIncludesSubString\x0a\x09self assert: ('amber' includesSubString: 'ber').\x0a\x09self deny: ('amber' includesSubString: 'zork').",
1812
+ messageSends: ["assert:", "includesSubString:", "deny:"],
1678
1813
  referencedClasses: []
1679
1814
  }),
1680
- smalltalk.PointTest);
1815
+ smalltalk.StringTest);
1681
1816
 
1682
1817
  smalltalk.addMethod(
1683
- unescape('_testArithmetic'),
1818
+ "_testJoin",
1684
1819
  smalltalk.method({
1685
- selector: unescape('testArithmetic'),
1820
+ selector: "testJoin",
1686
1821
  category: 'tests',
1687
- fn: function () {
1822
+ fn: function (){
1688
1823
  var self=this;
1689
- smalltalk.send(self, "_assert_equals_", [((($receiver = smalltalk.send((3), "__at", [(4)])).klass === smalltalk.Number) ? $receiver *smalltalk.send((3), "__at", [(4)]) : smalltalk.send($receiver, "__star", [smalltalk.send((3), "__at", [(4)])])), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(9), (16)])]);
1690
- smalltalk.send(self, "_assert_equals_", [((($receiver = smalltalk.send((3), "__at", [(4)])).klass === smalltalk.Number) ? $receiver +smalltalk.send((3), "__at", [(4)]) : smalltalk.send($receiver, "__plus", [smalltalk.send((3), "__at", [(4)])])), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(6), (8)])]);
1691
- smalltalk.send(self, "_assert_equals_", [((($receiver = smalltalk.send((3), "__at", [(4)])).klass === smalltalk.Number) ? $receiver -smalltalk.send((3), "__at", [(4)]) : smalltalk.send($receiver, "__minus", [smalltalk.send((3), "__at", [(4)])])), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(0), (0)])]);
1692
- smalltalk.send(self, "_assert_equals_", [((($receiver = smalltalk.send((6), "__at", [(8)])).klass === smalltalk.Number) ? $receiver /smalltalk.send((3), "__at", [(4)]) : smalltalk.send($receiver, "__slash", [smalltalk.send((3), "__at", [(4)])])), smalltalk.send((smalltalk.Point || Point), "_x_y_", [(2), (2)])]);
1824
+ smalltalk.send(self, "_assert_equals_", ["hello,world", smalltalk.send(",", "_join_", [["hello", "world"]])]);
1693
1825
  return self;},
1694
1826
  args: [],
1695
- source: unescape('testArithmetic%0A%09self%20assert%3A%203@4%20*%20%283@4%20%29%20equals%3A%20%28Point%20x%3A%209%20y%3A%2016%29.%0A%09self%20assert%3A%203@4%20+%20%283@4%20%29%20equals%3A%20%28Point%20x%3A%206%20y%3A%208%29.%0A%09self%20assert%3A%203@4%20-%20%283@4%20%29%20equals%3A%20%28Point%20x%3A%200%20y%3A%200%29.%0A%09self%20assert%3A%206@8%20/%20%283@4%20%29%20equals%3A%20%28Point%20x%3A%202%20y%3A%202%29'),
1696
- messageSends: ["assert:equals:", unescape("*"), unescape("@"), "x:y:", unescape("+"), unescape("-"), unescape("/")],
1697
- referencedClasses: ["Point"]
1827
+ source: "testJoin\x0a\x09self assert: 'hello,world' equals: (',' join: #('hello' 'world'))",
1828
+ messageSends: ["assert:equals:", "join:"],
1829
+ referencedClasses: []
1698
1830
  }),
1699
- smalltalk.PointTest);
1831
+ smalltalk.StringTest);
1700
1832
 
1701
1833
  smalltalk.addMethod(
1702
- unescape('_testTranslateBy'),
1834
+ "_testSize",
1703
1835
  smalltalk.method({
1704
- selector: unescape('testTranslateBy'),
1836
+ selector: "testSize",
1705
1837
  category: 'tests',
1706
1838
  fn: function (){
1707
1839
  var self=this;
1708
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((3), "__at", [(4)]), smalltalk.send(smalltalk.send((3), "__at", [(3)]), "_translateBy_", [smalltalk.send((0), "__at", [(1)])])]);
1709
- 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", [])])])]);
1710
- smalltalk.send(self, "_assert_equals_", [smalltalk.send((5), "__at", [(6)]), smalltalk.send(smalltalk.send((3), "__at", [(3)]), "_translateBy_", [smalltalk.send((2), "__at", [(3)])])]);
1711
- 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)])])]);
1840
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send("smalltalk", "_size", []), (9)]);
1841
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send("", "_size", []), (0)]);
1712
1842
  return self;},
1713
1843
  args: [],
1714
- source: unescape('testTranslateBy%0A%09self%20assert%3A%203@4%20equals%3A%20%283@3%20translateBy%3A%200@1%29.%0A%09self%20assert%3A%203@2%20equals%3A%20%283@3%20translateBy%3A%200@1%20negated%29.%0A%09self%20assert%3A%205@6%20equals%3A%20%283@3%20translateBy%3A%202@3%29.%0A%09self%20assert%3A%200@3%20equals%3A%20%283@3%20translateBy%3A%203%20negated%20@0%29.'),
1715
- messageSends: ["assert:equals:", unescape("@"), "translateBy:", "negated"],
1844
+ source: "testSize\x0a\x09self assert: 'smalltalk' size equals: 9.\x0a\x09self assert: '' size equals: 0",
1845
+ messageSends: ["assert:equals:", "size"],
1716
1846
  referencedClasses: []
1717
1847
  }),
1718
- smalltalk.PointTest);
1719
-
1720
-
1848
+ smalltalk.StringTest);
1721
1849
 
1722
- smalltalk.addClass('RandomTest', smalltalk.TestCase, [], 'Kernel-Tests');
1723
1850
  smalltalk.addMethod(
1724
- unescape('_textNext'),
1851
+ "_testStreamContents",
1725
1852
  smalltalk.method({
1726
- selector: unescape('textNext'),
1853
+ selector: "testStreamContents",
1727
1854
  category: 'tests',
1728
- fn: function () {
1855
+ fn: function (){
1729
1856
  var self=this;
1730
- smalltalk.send((10000), "_timesRepeat_", [(function(){var current=nil;
1731
- var next=nil;
1732
- (next=smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", []));smalltalk.send(self, "_assert_", [((($receiver = next).klass === smalltalk.Number) ? $receiver >=(0) : smalltalk.send($receiver, "__gt_eq", [(0)]))]);smalltalk.send(self, "_assert_", [((($receiver = next).klass === smalltalk.Number) ? $receiver <(1) : smalltalk.send($receiver, "__lt", [(1)]))]);smalltalk.send(self, "_deny_", [smalltalk.send(current, "__eq", [next])]);return smalltalk.send(next, "__eq", [current]);})]);
1857
+ smalltalk.send(self, "_assert_equals_", ["hello world", smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["hello"]);smalltalk.send($rec, "_space", []);return smalltalk.send($rec, "_nextPutAll_", ["world"]);})(aStream);})])]);
1733
1858
  return self;},
1734
1859
  args: [],
1735
- source: unescape('textNext%0A%0A%0910000%20timesRepeat%3A%20%5B%0A%09%09%09%7C%20current%20next%20%7C%20%0A%09%09%09next%20%3A%3D%20Random%20new%20next.%0A%09%09%09self%20assert%3A%20%28next%20%3E%3D%200%29.%0A%09%09%09self%20assert%3A%20%28next%20%3C%201%29.%0A%09%09%09self%20deny%3A%20current%20%3D%20next.%0A%09%09%09next%20%3D%20current%5D'),
1736
- messageSends: ["timesRepeat:", "next", "new", "assert:", unescape("%3E%3D"), unescape("%3C"), "deny:", unescape("%3D")],
1737
- referencedClasses: ["Random"]
1860
+ source: "testStreamContents\x0a\x09self \x0a\x09\x09assert: 'hello world' \x0a\x09\x09equals: (String streamContents: [:aStream| aStream \x0a \x09\x09\x09\x09\x09nextPutAll: 'hello'; space; \x0a \x09\x09\x09\x09\x09nextPutAll: 'world'])",
1861
+ messageSends: ["assert:equals:", "streamContents:", "nextPutAll:", "space"],
1862
+ referencedClasses: ["String"]
1738
1863
  }),
1739
- smalltalk.RandomTest);
1864
+ smalltalk.StringTest);
1740
1865
 
1741
1866
 
1742
1867
 
1743
- smalltalk.addClass('ClassBuilderTest', smalltalk.TestCase, ['builder', 'theClass'], 'Kernel-Tests');
1868
+ smalltalk.addClass('SymbolTest', smalltalk.TestCase, [], 'Kernel-Tests');
1744
1869
  smalltalk.addMethod(
1745
- unescape('_setUp'),
1870
+ "_testAsString",
1746
1871
  smalltalk.method({
1747
- selector: unescape('setUp'),
1748
- category: 'running',
1749
- fn: function () {
1872
+ selector: "testAsString",
1873
+ category: 'tests',
1874
+ fn: function (){
1750
1875
  var self=this;
1751
- (self['@builder']=smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []));
1876
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.symbolFor("hello"), "_asString", []), "hello"]);
1752
1877
  return self;},
1753
1878
  args: [],
1754
- source: unescape('setUp%0A%09builder%20%3A%3D%20ClassBuilder%20new'),
1755
- messageSends: ["new"],
1756
- referencedClasses: ["ClassBuilder"]
1879
+ source: "testAsString\x0a\x09self assert: #hello asString equals: 'hello'",
1880
+ messageSends: ["assert:equals:", "asString"],
1881
+ referencedClasses: []
1757
1882
  }),
1758
- smalltalk.ClassBuilderTest);
1883
+ smalltalk.SymbolTest);
1759
1884
 
1760
1885
  smalltalk.addMethod(
1761
- unescape('_tearDown'),
1886
+ "_testAsSymbol",
1762
1887
  smalltalk.method({
1763
- selector: unescape('tearDown'),
1764
- category: 'running',
1765
- fn: function () {
1888
+ selector: "testAsSymbol",
1889
+ category: 'tests',
1890
+ fn: function (){
1766
1891
  var self=this;
1767
- (($receiver = self['@theClass']) != nil && $receiver != undefined) ? (function(){smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_removeClass_", [self['@theClass']]);return (self['@theClass']=nil);})() : nil;
1892
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq_eq", [smalltalk.send(smalltalk.symbolFor("hello"), "_asSymbol", [])])]);
1768
1893
  return self;},
1769
1894
  args: [],
1770
- source: unescape('tearDown%0A%09theClass%20ifNotNil%3A%20%5BSmalltalk%20current%20removeClass%3A%20theClass.%20theClass%20%3A%3D%20nil%5D'),
1771
- messageSends: ["ifNotNil:", "removeClass:", "current"],
1772
- referencedClasses: ["Smalltalk"]
1895
+ source: "testAsSymbol\x0a\x09self assert: #hello == #hello asSymbol",
1896
+ messageSends: ["assert:", "==", "asSymbol"],
1897
+ referencedClasses: []
1773
1898
  }),
1774
- smalltalk.ClassBuilderTest);
1899
+ smalltalk.SymbolTest);
1775
1900
 
1776
1901
  smalltalk.addMethod(
1777
- unescape('_testClassCopy'),
1902
+ "_testAt",
1778
1903
  smalltalk.method({
1779
- selector: unescape('testClassCopy'),
1780
- category: 'running',
1781
- fn: function () {
1904
+ selector: "testAt",
1905
+ category: 'tests',
1906
+ fn: function (){
1782
1907
  var self=this;
1783
- (self['@theClass']=smalltalk.send(self['@builder'], "_copyClass_named_", [(smalltalk.ObjectMock || ObjectMock), "ObjectMock2"]));
1784
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@theClass'], "_superclass", []), "__eq_eq", [smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_superclass", [])])]);
1785
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@theClass'], "_instanceVariableNames", []), "__eq_eq", [smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_instanceVariableNames", [])])]);
1786
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(self['@theClass'], "_name", []), "ObjectMock2"]);
1787
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(self['@theClass'], "_package", []), "__eq_eq", [smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_package", [])])]);
1788
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send(self['@theClass'], "_methodDictionary", []), "_keys", []), smalltalk.send(smalltalk.send((smalltalk.ObjectMock || ObjectMock), "_methodDictionary", []), "_keys", [])]);
1908
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_at_", [(1)]), "__eq", ["h"])]);
1909
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_at_", [(5)]), "__eq", ["o"])]);
1910
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_at_ifAbsent_", [(6), (function(){return nil;})]), "__eq", [nil])]);
1789
1911
  return self;},
1790
1912
  args: [],
1791
- source: unescape('testClassCopy%0A%09theClass%20%3A%3D%20builder%20copyClass%3A%20ObjectMock%20named%3A%20%27ObjectMock2%27.%0A%09self%20assert%3A%20theClass%20superclass%20%3D%3D%20ObjectMock%20superclass.%0A%09self%20assert%3A%20theClass%20instanceVariableNames%20%3D%3D%20ObjectMock%20instanceVariableNames.%0A%09self%20assert%3A%20theClass%20name%20equals%3A%20%27ObjectMock2%27.%0A%09self%20assert%3A%20theClass%20package%20%3D%3D%20ObjectMock%20package.%0A%09self%20assert%3A%20theClass%20methodDictionary%20keys%20equals%3A%20ObjectMock%20methodDictionary%20keys'),
1792
- messageSends: ["copyClass:named:", "assert:", unescape("%3D%3D"), "superclass", "instanceVariableNames", "assert:equals:", "name", "package", "keys", "methodDictionary"],
1793
- referencedClasses: ["ObjectMock"]
1913
+ 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",
1914
+ messageSends: ["assert:", "=", "at:", "at:ifAbsent:"],
1915
+ referencedClasses: []
1794
1916
  }),
1795
- smalltalk.ClassBuilderTest);
1917
+ smalltalk.SymbolTest);
1796
1918
 
1797
1919
  smalltalk.addMethod(
1798
- unescape('_testInstanceVariableNames'),
1920
+ "_testAtPut",
1799
1921
  smalltalk.method({
1800
- selector: unescape('testInstanceVariableNames'),
1801
- category: 'running',
1802
- fn: function () {
1922
+ selector: "testAtPut",
1923
+ category: 'tests',
1924
+ fn: function (){
1803
1925
  var self=this;
1804
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(self['@builder'], "_instanceVariableNamesFor_", [" hello world "]), ["hello", "world"]]);
1926
+ smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send("hello", "_at_put_", [(1), "a"]);}), (smalltalk.Error || Error)]);
1805
1927
  return self;},
1806
1928
  args: [],
1807
- source: unescape('testInstanceVariableNames%0A%09self%20assert%3A%20%28builder%20instanceVariableNamesFor%3A%20%27%20%20hello%20%20%20world%20%20%20%27%29%20equals%3A%20%23%28%27hello%27%20%27world%27%29'),
1808
- messageSends: ["assert:equals:", "instanceVariableNamesFor:"],
1809
- referencedClasses: []
1929
+ source: "testAtPut\x0a\x09\x22Symbol instances are read-only\x22\x0a\x09self should: ['hello' at: 1 put: 'a'] raise: Error",
1930
+ messageSends: ["should:raise:", "at:put:"],
1931
+ referencedClasses: ["Error"]
1810
1932
  }),
1811
- smalltalk.ClassBuilderTest);
1812
-
1813
-
1933
+ smalltalk.SymbolTest);
1814
1934
 
1815
- smalltalk.addClass('SetTest', smalltalk.TestCase, [], 'Kernel-Tests');
1816
1935
  smalltalk.addMethod(
1817
- unescape('_testUnicity'),
1936
+ "_testComparing",
1818
1937
  smalltalk.method({
1819
- selector: unescape('testUnicity'),
1938
+ selector: "testComparing",
1820
1939
  category: 'tests',
1821
- fn: function () {
1940
+ fn: function (){
1822
1941
  var self=this;
1823
- var set=nil;
1824
- (set=smalltalk.send((smalltalk.Set || Set), "_new", []));
1825
- smalltalk.send(set, "_add_", [(21)]);
1826
- smalltalk.send(set, "_add_", ["hello"]);
1827
- smalltalk.send(set, "_add_", [(21)]);
1828
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(set, "_size", []), "__eq", [(2)])]);
1829
- smalltalk.send(set, "_add_", ["hello"]);
1830
- smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(set, "_size", []), "__eq", [(2)])]);
1831
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(set, "_asArray", []), [(21), "hello"]]);
1942
+ smalltalk.send(self, "_assert_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver >smalltalk.symbolFor("aa") : smalltalk.send($receiver, "__gt", [smalltalk.symbolFor("aa")]))]);
1943
+ smalltalk.send(self, "_deny_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver >smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__gt", [smalltalk.symbolFor("ba")]))]);
1944
+ smalltalk.send(self, "_assert_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver <smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__lt", [smalltalk.symbolFor("ba")]))]);
1945
+ smalltalk.send(self, "_deny_", [((($receiver = smalltalk.symbolFor("bb")).klass === smalltalk.Number) ? $receiver <smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__lt", [smalltalk.symbolFor("ba")]))]);
1946
+ smalltalk.send(self, "_assert_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver >=smalltalk.symbolFor("aa") : smalltalk.send($receiver, "__gt_eq", [smalltalk.symbolFor("aa")]))]);
1947
+ smalltalk.send(self, "_deny_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver >=smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__gt_eq", [smalltalk.symbolFor("ba")]))]);
1948
+ smalltalk.send(self, "_assert_", [((($receiver = smalltalk.symbolFor("ab")).klass === smalltalk.Number) ? $receiver <=smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__lt_eq", [smalltalk.symbolFor("ba")]))]);
1949
+ smalltalk.send(self, "_deny_", [((($receiver = smalltalk.symbolFor("bb")).klass === smalltalk.Number) ? $receiver <=smalltalk.symbolFor("ba") : smalltalk.send($receiver, "__lt_eq", [smalltalk.symbolFor("ba")]))]);
1832
1950
  return self;},
1833
1951
  args: [],
1834
- source: unescape('testUnicity%0A%09%7C%20set%20%7C%0A%09set%20%3A%3D%20Set%20new.%0A%09set%20add%3A%2021.%0A%09set%20add%3A%20%27hello%27.%0A%0A%09set%20add%3A%2021.%0A%09self%20assert%3A%20set%20size%20%3D%202.%0A%09%0A%09set%20add%3A%20%27hello%27.%0A%09self%20assert%3A%20set%20size%20%3D%202.%0A%0A%09self%20assert%3A%20set%20asArray%20equals%3A%20%23%2821%20%27hello%27%29'),
1835
- messageSends: ["new", "add:", "assert:", unescape("%3D"), "size", "assert:equals:", "asArray"],
1836
- referencedClasses: ["Set"]
1952
+ 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",
1953
+ messageSends: ["assert:", ">", "deny:", "<", ">=", "<="],
1954
+ referencedClasses: []
1837
1955
  }),
1838
- smalltalk.SetTest);
1956
+ smalltalk.SymbolTest);
1839
1957
 
1840
1958
  smalltalk.addMethod(
1841
- unescape('_testAt'),
1959
+ "_testCopying",
1842
1960
  smalltalk.method({
1843
- selector: unescape('testAt'),
1961
+ selector: "testCopying",
1844
1962
  category: 'tests',
1845
- fn: function () {
1963
+ fn: function (){
1846
1964
  var self=this;
1847
- smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(smalltalk.send((smalltalk.Set || Set), "_new", []), "_at_put_", [(1), (2)]);}), (smalltalk.Error || Error)]);
1965
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_copy", []), "__eq_eq", [smalltalk.symbolFor("hello")])]);
1966
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_deepCopy", []), "__eq_eq", [smalltalk.symbolFor("hello")])]);
1848
1967
  return self;},
1849
1968
  args: [],
1850
- source: unescape('testAt%0A%09self%20should%3A%20%5BSet%20new%20at%3A%201%20put%3A%202%5D%20raise%3A%20Error'),
1851
- messageSends: ["should:raise:", "at:put:", "new"],
1852
- referencedClasses: ["Set", "Error"]
1969
+ source: "testCopying\x0a\x09self assert: #hello copy == #hello.\x0a\x09self assert: #hello deepCopy == #hello",
1970
+ messageSends: ["assert:", "==", "copy", "deepCopy"],
1971
+ referencedClasses: []
1853
1972
  }),
1854
- smalltalk.SetTest);
1973
+ smalltalk.SymbolTest);
1855
1974
 
1856
1975
  smalltalk.addMethod(
1857
- unescape('_testAddRemove'),
1976
+ "_testEquality",
1858
1977
  smalltalk.method({
1859
- selector: unescape('testAddRemove'),
1978
+ selector: "testEquality",
1860
1979
  category: 'tests',
1861
- fn: function () {
1980
+ fn: function (){
1862
1981
  var self=this;
1863
- var set=nil;
1864
- (set=smalltalk.send((smalltalk.Set || Set), "_new", []));
1865
- smalltalk.send(self, "_assert_", [smalltalk.send(set, "_isEmpty", [])]);
1866
- smalltalk.send(set, "_add_", [(3)]);
1867
- smalltalk.send(self, "_assert_", [smalltalk.send(set, "_includes_", [(3)])]);
1868
- smalltalk.send(set, "_add_", [(5)]);
1869
- smalltalk.send(self, "_assert_", [smalltalk.send(set, "_includes_", [(5)])]);
1870
- smalltalk.send(set, "_remove_", [(3)]);
1871
- smalltalk.send(self, "_deny_", [smalltalk.send(set, "_includes_", [(3)])]);
1982
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", [smalltalk.symbolFor("hello")])]);
1983
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", [smalltalk.symbolFor("world")])]);
1984
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", [smalltalk.send(smalltalk.symbolFor("hello"), "_yourself", [])])]);
1985
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_yourself", []), "__eq", [smalltalk.symbolFor("hello")])]);
1986
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", ["hello"])]);
1987
+ smalltalk.send(self, "_deny_", [smalltalk.send("hello", "__eq", [smalltalk.symbolFor("hello")])]);
1872
1988
  return self;},
1873
1989
  args: [],
1874
- source: unescape('testAddRemove%0A%09%7C%20set%20%7C%0A%09set%20%3A%3D%20Set%20new.%0A%09%0A%09self%20assert%3A%20set%20isEmpty.%0A%0A%09set%20add%3A%203.%0A%09self%20assert%3A%20%28set%20includes%3A%203%29.%0A%0A%09set%20add%3A%205.%0A%09self%20assert%3A%20%28set%20includes%3A%205%29.%0A%0A%09set%20remove%3A%203.%0A%09self%20deny%3A%20%28set%20includes%3A%203%29'),
1875
- messageSends: ["new", "assert:", "isEmpty", "add:", "includes:", "remove:", "deny:"],
1876
- referencedClasses: ["Set"]
1990
+ 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.",
1991
+ messageSends: ["assert:", "=", "deny:", "yourself"],
1992
+ referencedClasses: []
1877
1993
  }),
1878
- smalltalk.SetTest);
1994
+ smalltalk.SymbolTest);
1879
1995
 
1880
1996
  smalltalk.addMethod(
1881
- unescape('_testSize'),
1997
+ "_testIdentity",
1882
1998
  smalltalk.method({
1883
- selector: unescape('testSize'),
1999
+ selector: "testIdentity",
1884
2000
  category: 'tests',
1885
- fn: function () {
2001
+ fn: function (){
1886
2002
  var self=this;
1887
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Set || Set), "_new", []), "_size", []), (0)]);
1888
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Set || Set), "_withAll_", [[(1), (2), (3), (4)]]), "_size", []), (4)]);
1889
- smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.send((smalltalk.Set || Set), "_withAll_", [[(1), (1), (1), (1)]]), "_size", []), (1)]);
2003
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq_eq", [smalltalk.symbolFor("hello")])]);
2004
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq_eq", [smalltalk.symbolFor("world")])]);
2005
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "__eq", [smalltalk.send(smalltalk.symbolFor("hello"), "_yourself", [])])]);
2006
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_yourself", []), "__eq", [smalltalk.send(smalltalk.send(smalltalk.symbolFor("hello"), "_asString", []), "_asSymbol", [])])]);
1890
2007
  return self;},
1891
2008
  args: [],
1892
- source: unescape('testSize%0A%09self%20assert%3A%20Set%20new%20size%20equals%3A%200.%0A%09self%20assert%3A%20%28Set%20withAll%3A%20%23%281%202%203%204%29%29%20size%20equals%3A%204.%0A%09self%20assert%3A%20%28Set%20withAll%3A%20%23%281%201%201%201%29%29%20size%20equals%3A%201'),
1893
- messageSends: ["assert:equals:", "size", "new", "withAll:"],
1894
- referencedClasses: ["Set"]
2009
+ 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",
2010
+ messageSends: ["assert:", "==", "deny:", "=", "yourself", "asSymbol", "asString"],
2011
+ referencedClasses: []
1895
2012
  }),
1896
- smalltalk.SetTest);
1897
-
1898
-
2013
+ smalltalk.SymbolTest);
1899
2014
 
1900
- smalltalk.addClass('PackageWithDefaultCommitPathChangedTest', smalltalk.PackageTest, [], 'Kernel-Tests');
1901
2015
  smalltalk.addMethod(
1902
- unescape('_setUp'),
2016
+ "_testIsSymbolIsString",
1903
2017
  smalltalk.method({
1904
- selector: unescape('setUp'),
1905
- category: 'running',
1906
- fn: function () {
2018
+ selector: "testIsSymbolIsString",
2019
+ category: 'tests',
2020
+ fn: function (){
1907
2021
  var self=this;
1908
- smalltalk.send(self, "_setUp", [], smalltalk.PackageTest);
1909
- (function($rec){smalltalk.send($rec, "_defaultCommitPathJs_", [unescape("javascripts/")]);return smalltalk.send($rec, "_defaultCommitPathSt_", [unescape("smalltalk/")]);})((smalltalk.Package || Package));
2022
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.symbolFor("hello"), "_isSymbol", [])]);
2023
+ smalltalk.send(self, "_deny_", [smalltalk.send("hello", "_isSymbol", [])]);
2024
+ smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.symbolFor("hello"), "_isString", [])]);
2025
+ smalltalk.send(self, "_assert_", [smalltalk.send("hello", "_isString", [])]);
1910
2026
  return self;},
1911
2027
  args: [],
1912
- source: unescape('setUp%0A%09super%20setUp.%0A%0A%09Package%0A%09%09defaultCommitPathJs%3A%20%27javascripts/%27%3B%0A%09%09defaultCommitPathSt%3A%20%27smalltalk/%27.'),
1913
- messageSends: ["setUp", "defaultCommitPathJs:", "defaultCommitPathSt:"],
1914
- referencedClasses: ["Package"]
2028
+ source: "testIsSymbolIsString\x0a\x09self assert: #hello isSymbol.\x0a\x09self deny: 'hello' isSymbol.\x0a\x09self deny: #hello isString.\x0a\x09self assert: 'hello' isString",
2029
+ messageSends: ["assert:", "isSymbol", "deny:", "isString"],
2030
+ referencedClasses: []
1915
2031
  }),
1916
- smalltalk.PackageWithDefaultCommitPathChangedTest);
2032
+ smalltalk.SymbolTest);
1917
2033
 
1918
2034
  smalltalk.addMethod(
1919
- unescape('_testGrulCommitPathJsShouldBeServerGrulJs'),
2035
+ "_testSize",
1920
2036
  smalltalk.method({
1921
- selector: unescape('testGrulCommitPathJsShouldBeServerGrulJs'),
2037
+ selector: "testSize",
1922
2038
  category: 'tests',
1923
- fn: function () {
2039
+ fn: function (){
1924
2040
  var self=this;
1925
- smalltalk.send(self, "_assert_equals_", [unescape("server/grul/js"), smalltalk.send(self['@grulPackage'], "_commitPathJs", [])]);
2041
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.symbolFor("a"), "_size", []), (1)]);
2042
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(smalltalk.symbolFor("aaaaa"), "_size", []), (5)]);
1926
2043
  return self;},
1927
2044
  args: [],
1928
- source: unescape('testGrulCommitPathJsShouldBeServerGrulJs%0A%09self%20assert%3A%20%27server/grul/js%27%20equals%3A%20grulPackage%20commitPathJs'),
1929
- messageSends: ["assert:equals:", "commitPathJs"],
2045
+ source: "testSize\x0a\x09self assert: #a size equals: 1.\x0a\x09self assert: #aaaaa size equals: 5",
2046
+ messageSends: ["assert:equals:", "size"],
1930
2047
  referencedClasses: []
1931
2048
  }),
1932
- smalltalk.PackageWithDefaultCommitPathChangedTest);
2049
+ smalltalk.SymbolTest);
2050
+
2051
+
1933
2052
 
2053
+ smalltalk.addClass('UndefinedTest', smalltalk.TestCase, [], 'Kernel-Tests');
1934
2054
  smalltalk.addMethod(
1935
- unescape('_testGrulCommitPathStShouldBeGrulSt'),
2055
+ "_testCopying",
1936
2056
  smalltalk.method({
1937
- selector: unescape('testGrulCommitPathStShouldBeGrulSt'),
2057
+ selector: "testCopying",
1938
2058
  category: 'tests',
1939
- fn: function () {
2059
+ fn: function (){
1940
2060
  var self=this;
1941
- smalltalk.send(self, "_assert_equals_", [unescape("grul/st"), smalltalk.send(self['@grulPackage'], "_commitPathSt", [])]);
2061
+ smalltalk.send(self, "_assert_equals_", [smalltalk.send(nil, "_copy", []), nil]);
1942
2062
  return self;},
1943
2063
  args: [],
1944
- source: unescape('testGrulCommitPathStShouldBeGrulSt%0A%09self%20assert%3A%20%27grul/st%27%20equals%3A%20grulPackage%20commitPathSt'),
1945
- messageSends: ["assert:equals:", "commitPathSt"],
2064
+ source: "testCopying\x0a\x09self assert: nil copy equals: nil",
2065
+ messageSends: ["assert:equals:", "copy"],
1946
2066
  referencedClasses: []
1947
2067
  }),
1948
- smalltalk.PackageWithDefaultCommitPathChangedTest);
2068
+ smalltalk.UndefinedTest);
1949
2069
 
1950
2070
  smalltalk.addMethod(
1951
- unescape('_testZorkCommitPathJsShouldBeJavascript'),
2071
+ "_testDeepCopy",
1952
2072
  smalltalk.method({
1953
- selector: unescape('testZorkCommitPathJsShouldBeJavascript'),
2073
+ selector: "testDeepCopy",
1954
2074
  category: 'tests',
1955
- fn: function () {
2075
+ fn: function (){
1956
2076
  var self=this;
1957
- smalltalk.send(self, "_assert_equals_", [unescape("javascripts/"), smalltalk.send(self['@zorkPackage'], "_commitPathJs", [])]);
2077
+ smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(nil, "_deepCopy", []), "__eq", [nil])]);
1958
2078
  return self;},
1959
2079
  args: [],
1960
- source: unescape('testZorkCommitPathJsShouldBeJavascript%0A%09self%20assert%3A%20%27javascripts/%27%20equals%3A%20zorkPackage%20commitPathJs'),
1961
- messageSends: ["assert:equals:", "commitPathJs"],
2080
+ source: "testDeepCopy\x0a\x09self assert: nil deepCopy = nil",
2081
+ messageSends: ["assert:", "=", "deepCopy"],
1962
2082
  referencedClasses: []
1963
2083
  }),
1964
- smalltalk.PackageWithDefaultCommitPathChangedTest);
2084
+ smalltalk.UndefinedTest);
1965
2085
 
1966
2086
  smalltalk.addMethod(
1967
- unescape('_testZorkCommitPathStShouldBeSmalltalk'),
2087
+ "_testIfNil",
1968
2088
  smalltalk.method({
1969
- selector: unescape('testZorkCommitPathStShouldBeSmalltalk'),
2089
+ selector: "testIfNil",
1970
2090
  category: 'tests',
1971
- fn: function () {
2091
+ fn: function (){
1972
2092
  var self=this;
1973
- smalltalk.send(self, "_assert_equals_", [unescape("smalltalk/"), smalltalk.send(self['@zorkPackage'], "_commitPathSt", [])]);
2093
+ smalltalk.send(self, "_assert_equals_", [(($receiver = nil) == nil || $receiver == undefined) ? (function(){return true;})() : $receiver, true]);
2094
+ smalltalk.send(self, "_deny_", [smalltalk.send((($receiver = nil) != nil && $receiver != undefined) ? (function(){return true;})() : nil, "__eq", [true])]);
2095
+ smalltalk.send(self, "_assert_equals_", [(($receiver = nil) == nil || $receiver == undefined) ? (function(){return true;})() : (function(){return false;})(), true]);
2096
+ smalltalk.send(self, "_deny_", [smalltalk.send((($receiver = nil) == nil || $receiver == undefined) ? (function(){return false;})() : (function(){return true;})(), "__eq", [true])]);
1974
2097
  return self;},
1975
2098
  args: [],
1976
- source: unescape('testZorkCommitPathStShouldBeSmalltalk%0A%09self%20assert%3A%20%27smalltalk/%27%20equals%3A%20zorkPackage%20commitPathSt'),
1977
- messageSends: ["assert:equals:", "commitPathSt"],
2099
+ 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",
2100
+ messageSends: ["assert:equals:", "ifNil:", "deny:", "=", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"],
1978
2101
  referencedClasses: []
1979
2102
  }),
1980
- smalltalk.PackageWithDefaultCommitPathChangedTest);
1981
-
2103
+ smalltalk.UndefinedTest);
1982
2104
 
1983
2105
  smalltalk.addMethod(
1984
- unescape('_shouldInheritSelectors'),
2106
+ "_testIsNil",
1985
2107
  smalltalk.method({
1986
- selector: unescape('shouldInheritSelectors'),
1987
- category: 'accessing',
1988
- fn: function () {
2108
+ selector: "testIsNil",
2109
+ category: 'tests',
2110
+ fn: function (){
1989
2111
  var self=this;
1990
- return false;
2112
+ smalltalk.send(self, "_assert_", [smalltalk.send(nil, "_isNil", [])]);
2113
+ smalltalk.send(self, "_deny_", [smalltalk.send(nil, "_notNil", [])]);
1991
2114
  return self;},
1992
2115
  args: [],
1993
- source: unescape('shouldInheritSelectors%0A%09%5E%20false'),
1994
- messageSends: [],
2116
+ source: "testIsNil\x0a\x09self assert: nil isNil.\x0a\x09self deny: nil notNil.",
2117
+ messageSends: ["assert:", "isNil", "deny:", "notNil"],
1995
2118
  referencedClasses: []
1996
2119
  }),
1997
- smalltalk.PackageWithDefaultCommitPathChangedTest.klass);
2120
+ smalltalk.UndefinedTest);
2121
+
1998
2122
 
1999
2123