resin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +52 -0
- data/amber/css/amber.css +519 -0
- data/amber/css/documentation.css +84 -0
- data/amber/css/profstef.css +75 -0
- data/amber/css/style.css +313 -0
- data/amber/images/amber.png +0 -0
- data/amber/images/amber_small.png +0 -0
- data/amber/images/off.png +0 -0
- data/amber/images/offHover.png +0 -0
- data/amber/images/presentation.png +0 -0
- data/amber/images/profstef.png +0 -0
- data/amber/images/sprite.png +0 -0
- data/amber/images/tinylogo.png +0 -0
- data/amber/images/twitterwall.png +0 -0
- data/amber/js/Additional-Examples.deploy.js +15 -0
- data/amber/js/Additional-Examples.js +21 -0
- data/amber/js/Benchfib.deploy.js +132 -0
- data/amber/js/Benchfib.js +167 -0
- data/amber/js/Canvas.deploy.js +1304 -0
- data/amber/js/Canvas.js +1885 -0
- data/amber/js/Compiler.deploy.js +1871 -0
- data/amber/js/Compiler.js +2616 -0
- data/amber/js/Documentation.deploy.js +961 -0
- data/amber/js/Documentation.js +1376 -0
- data/amber/js/Examples.deploy.js +53 -0
- data/amber/js/Examples.js +73 -0
- data/amber/js/IDE.deploy.js +3468 -0
- data/amber/js/IDE.js +4883 -0
- data/amber/js/Kernel-Announcements.deploy.js +107 -0
- data/amber/js/Kernel-Announcements.js +152 -0
- data/amber/js/Kernel-Classes.deploy.js +675 -0
- data/amber/js/Kernel-Classes.js +956 -0
- data/amber/js/Kernel-Collections.deploy.js +3273 -0
- data/amber/js/Kernel-Collections.js +4644 -0
- data/amber/js/Kernel-Exceptions.deploy.js +244 -0
- data/amber/js/Kernel-Exceptions.js +349 -0
- data/amber/js/Kernel-Methods.deploy.js +510 -0
- data/amber/js/Kernel-Methods.js +739 -0
- data/amber/js/Kernel-Objects.deploy.js +2698 -0
- data/amber/js/Kernel-Objects.js +3858 -0
- data/amber/js/Kernel-Tests.deploy.js +1419 -0
- data/amber/js/Kernel-Tests.js +1929 -0
- data/amber/js/Kernel-Transcript.deploy.js +142 -0
- data/amber/js/Kernel-Transcript.js +202 -0
- data/amber/js/SUnit.deploy.js +351 -0
- data/amber/js/SUnit.js +501 -0
- data/amber/js/amber.js +250 -0
- data/amber/js/boot.js +587 -0
- data/amber/js/compat.js +22 -0
- data/amber/js/init.js +8 -0
- data/amber/js/lib/CodeMirror/LICENSE +19 -0
- data/amber/js/lib/CodeMirror/amber.css +21 -0
- data/amber/js/lib/CodeMirror/codemirror.css +67 -0
- data/amber/js/lib/CodeMirror/codemirror.js +2144 -0
- data/amber/js/lib/CodeMirror/smalltalk.js +134 -0
- data/amber/js/lib/jQuery/jquery-1.4.4.min.js +167 -0
- data/amber/js/lib/jQuery/jquery-1.6.4.min.js +4 -0
- data/amber/js/lib/jQuery/jquery-ui-1.8.16.custom.min.js +791 -0
- data/amber/js/lib/jQuery/jquery.textarea.js +267 -0
- data/amber/js/lib/peg-0.6.2.min.js +2 -0
- data/amber/js/lib/showdown.js +419 -0
- data/amber/js/parser.js +4005 -0
- data/amber/js/parser.pegjs +220 -0
- data/amber/st/Benchfib.st +124 -0
- data/amber/st/Canvas.st +556 -0
- data/amber/st/Compiler.st +1425 -0
- data/amber/st/Documentation.st +758 -0
- data/amber/st/Examples.st +38 -0
- data/amber/st/IDE.st +2336 -0
- data/amber/st/Kernel-Announcements.st +61 -0
- data/amber/st/Kernel-Classes.st +403 -0
- data/amber/st/Kernel-Collections.st +1673 -0
- data/amber/st/Kernel-Exceptions.st +124 -0
- data/amber/st/Kernel-Methods.st +287 -0
- data/amber/st/Kernel-Objects.st +1489 -0
- data/amber/st/Kernel-Tests.st +892 -0
- data/amber/st/Kernel-Transcript.st +70 -0
- data/amber/st/SUnit.st +172 -0
- data/bin/runresin +12 -0
- data/lib/resin.rb +0 -0
- data/lib/resin/app/app.rb +121 -0
- data/lib/resin/app/views/index.haml +10 -0
- metadata +216 -0
@@ -0,0 +1,142 @@
|
|
1
|
+
smalltalk.addPackage('Kernel-Transcript', {});
|
2
|
+
smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
|
3
|
+
|
4
|
+
smalltalk.Transcript.klass.iVarNames = ['current'];
|
5
|
+
smalltalk.addMethod(
|
6
|
+
'_open',
|
7
|
+
smalltalk.method({
|
8
|
+
selector: 'open',
|
9
|
+
fn: function (){
|
10
|
+
var self=this;
|
11
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
|
12
|
+
return self;}
|
13
|
+
}),
|
14
|
+
smalltalk.Transcript.klass);
|
15
|
+
|
16
|
+
smalltalk.addMethod(
|
17
|
+
'_new',
|
18
|
+
smalltalk.method({
|
19
|
+
selector: 'new',
|
20
|
+
fn: function (){
|
21
|
+
var self=this;
|
22
|
+
smalltalk.send(self, "_shouldNotImplement", []);
|
23
|
+
return self;}
|
24
|
+
}),
|
25
|
+
smalltalk.Transcript.klass);
|
26
|
+
|
27
|
+
smalltalk.addMethod(
|
28
|
+
'_current',
|
29
|
+
smalltalk.method({
|
30
|
+
selector: 'current',
|
31
|
+
fn: function (){
|
32
|
+
var self=this;
|
33
|
+
return self['@current'];
|
34
|
+
return self;}
|
35
|
+
}),
|
36
|
+
smalltalk.Transcript.klass);
|
37
|
+
|
38
|
+
smalltalk.addMethod(
|
39
|
+
'_show_',
|
40
|
+
smalltalk.method({
|
41
|
+
selector: 'show:',
|
42
|
+
fn: function (anObject){
|
43
|
+
var self=this;
|
44
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
|
45
|
+
return self;}
|
46
|
+
}),
|
47
|
+
smalltalk.Transcript.klass);
|
48
|
+
|
49
|
+
smalltalk.addMethod(
|
50
|
+
'_cr',
|
51
|
+
smalltalk.method({
|
52
|
+
selector: 'cr',
|
53
|
+
fn: function (){
|
54
|
+
var self=this;
|
55
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
|
56
|
+
return self;}
|
57
|
+
}),
|
58
|
+
smalltalk.Transcript.klass);
|
59
|
+
|
60
|
+
smalltalk.addMethod(
|
61
|
+
'_clear',
|
62
|
+
smalltalk.method({
|
63
|
+
selector: 'clear',
|
64
|
+
fn: function (){
|
65
|
+
var self=this;
|
66
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
|
67
|
+
return self;}
|
68
|
+
}),
|
69
|
+
smalltalk.Transcript.klass);
|
70
|
+
|
71
|
+
smalltalk.addMethod(
|
72
|
+
'_register_',
|
73
|
+
smalltalk.method({
|
74
|
+
selector: 'register:',
|
75
|
+
fn: function (aTranscript){
|
76
|
+
var self=this;
|
77
|
+
(self['@current']=aTranscript);
|
78
|
+
return self;}
|
79
|
+
}),
|
80
|
+
smalltalk.Transcript.klass);
|
81
|
+
|
82
|
+
|
83
|
+
smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
|
84
|
+
smalltalk.addMethod(
|
85
|
+
'_clear',
|
86
|
+
smalltalk.method({
|
87
|
+
selector: 'clear',
|
88
|
+
fn: function (){
|
89
|
+
var self=this;
|
90
|
+
|
91
|
+
return self;}
|
92
|
+
}),
|
93
|
+
smalltalk.ConsoleTranscript);
|
94
|
+
|
95
|
+
smalltalk.addMethod(
|
96
|
+
'_cr',
|
97
|
+
smalltalk.method({
|
98
|
+
selector: 'cr',
|
99
|
+
fn: function (){
|
100
|
+
var self=this;
|
101
|
+
|
102
|
+
return self;}
|
103
|
+
}),
|
104
|
+
smalltalk.ConsoleTranscript);
|
105
|
+
|
106
|
+
smalltalk.addMethod(
|
107
|
+
'_show_',
|
108
|
+
smalltalk.method({
|
109
|
+
selector: 'show:',
|
110
|
+
fn: function (anObject){
|
111
|
+
var self=this;
|
112
|
+
var string=nil;
|
113
|
+
(string=smalltalk.send(anObject, "_asString", []));
|
114
|
+
console.log(String(string));
|
115
|
+
return self;}
|
116
|
+
}),
|
117
|
+
smalltalk.ConsoleTranscript);
|
118
|
+
|
119
|
+
smalltalk.addMethod(
|
120
|
+
'_open',
|
121
|
+
smalltalk.method({
|
122
|
+
selector: 'open',
|
123
|
+
fn: function (){
|
124
|
+
var self=this;
|
125
|
+
|
126
|
+
return self;}
|
127
|
+
}),
|
128
|
+
smalltalk.ConsoleTranscript);
|
129
|
+
|
130
|
+
|
131
|
+
smalltalk.addMethod(
|
132
|
+
'_initialize',
|
133
|
+
smalltalk.method({
|
134
|
+
selector: 'initialize',
|
135
|
+
fn: function (){
|
136
|
+
var self=this;
|
137
|
+
smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
|
138
|
+
return self;}
|
139
|
+
}),
|
140
|
+
smalltalk.ConsoleTranscript.klass);
|
141
|
+
|
142
|
+
|
@@ -0,0 +1,202 @@
|
|
1
|
+
smalltalk.addPackage('Kernel-Transcript', {});
|
2
|
+
smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
|
3
|
+
|
4
|
+
smalltalk.Transcript.klass.iVarNames = ['current'];
|
5
|
+
smalltalk.addMethod(
|
6
|
+
unescape('_open'),
|
7
|
+
smalltalk.method({
|
8
|
+
selector: unescape('open'),
|
9
|
+
category: 'instance creation',
|
10
|
+
fn: function (){
|
11
|
+
var self=this;
|
12
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
|
13
|
+
return self;},
|
14
|
+
args: [],
|
15
|
+
source: unescape('open%0A%20%20%20%20self%20current%20open'),
|
16
|
+
messageSends: ["open", "current"],
|
17
|
+
referencedClasses: []
|
18
|
+
}),
|
19
|
+
smalltalk.Transcript.klass);
|
20
|
+
|
21
|
+
smalltalk.addMethod(
|
22
|
+
unescape('_new'),
|
23
|
+
smalltalk.method({
|
24
|
+
selector: unescape('new'),
|
25
|
+
category: 'instance creation',
|
26
|
+
fn: function (){
|
27
|
+
var self=this;
|
28
|
+
smalltalk.send(self, "_shouldNotImplement", []);
|
29
|
+
return self;},
|
30
|
+
args: [],
|
31
|
+
source: unescape('new%0A%20%20%20%20self%20shouldNotImplement'),
|
32
|
+
messageSends: ["shouldNotImplement"],
|
33
|
+
referencedClasses: []
|
34
|
+
}),
|
35
|
+
smalltalk.Transcript.klass);
|
36
|
+
|
37
|
+
smalltalk.addMethod(
|
38
|
+
unescape('_current'),
|
39
|
+
smalltalk.method({
|
40
|
+
selector: unescape('current'),
|
41
|
+
category: 'instance creation',
|
42
|
+
fn: function (){
|
43
|
+
var self=this;
|
44
|
+
return self['@current'];
|
45
|
+
return self;},
|
46
|
+
args: [],
|
47
|
+
source: unescape('current%0A%20%20%20%20%5Ecurrent'),
|
48
|
+
messageSends: [],
|
49
|
+
referencedClasses: []
|
50
|
+
}),
|
51
|
+
smalltalk.Transcript.klass);
|
52
|
+
|
53
|
+
smalltalk.addMethod(
|
54
|
+
unescape('_show_'),
|
55
|
+
smalltalk.method({
|
56
|
+
selector: unescape('show%3A'),
|
57
|
+
category: 'printing',
|
58
|
+
fn: function (anObject){
|
59
|
+
var self=this;
|
60
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
|
61
|
+
return self;},
|
62
|
+
args: ["anObject"],
|
63
|
+
source: unescape('show%3A%20anObject%0A%20%20%20%20self%20current%20show%3A%20anObject'),
|
64
|
+
messageSends: ["show:", "current"],
|
65
|
+
referencedClasses: []
|
66
|
+
}),
|
67
|
+
smalltalk.Transcript.klass);
|
68
|
+
|
69
|
+
smalltalk.addMethod(
|
70
|
+
unescape('_cr'),
|
71
|
+
smalltalk.method({
|
72
|
+
selector: unescape('cr'),
|
73
|
+
category: 'printing',
|
74
|
+
fn: function (){
|
75
|
+
var self=this;
|
76
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
|
77
|
+
return self;},
|
78
|
+
args: [],
|
79
|
+
source: unescape('cr%0A%20%20%20%20self%20current%20show%3A%20String%20cr'),
|
80
|
+
messageSends: ["show:", "current", "cr"],
|
81
|
+
referencedClasses: ["String"]
|
82
|
+
}),
|
83
|
+
smalltalk.Transcript.klass);
|
84
|
+
|
85
|
+
smalltalk.addMethod(
|
86
|
+
unescape('_clear'),
|
87
|
+
smalltalk.method({
|
88
|
+
selector: unescape('clear'),
|
89
|
+
category: 'printing',
|
90
|
+
fn: function (){
|
91
|
+
var self=this;
|
92
|
+
smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
|
93
|
+
return self;},
|
94
|
+
args: [],
|
95
|
+
source: unescape('clear%0A%20%20%20%20self%20current%20clear'),
|
96
|
+
messageSends: ["clear", "current"],
|
97
|
+
referencedClasses: []
|
98
|
+
}),
|
99
|
+
smalltalk.Transcript.klass);
|
100
|
+
|
101
|
+
smalltalk.addMethod(
|
102
|
+
unescape('_register_'),
|
103
|
+
smalltalk.method({
|
104
|
+
selector: unescape('register%3A'),
|
105
|
+
category: 'instance creation',
|
106
|
+
fn: function (aTranscript){
|
107
|
+
var self=this;
|
108
|
+
(self['@current']=aTranscript);
|
109
|
+
return self;},
|
110
|
+
args: ["aTranscript"],
|
111
|
+
source: unescape('register%3A%20aTranscript%0A%09current%20%3A%3D%20aTranscript'),
|
112
|
+
messageSends: [],
|
113
|
+
referencedClasses: []
|
114
|
+
}),
|
115
|
+
smalltalk.Transcript.klass);
|
116
|
+
|
117
|
+
|
118
|
+
smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
|
119
|
+
smalltalk.addMethod(
|
120
|
+
unescape('_clear'),
|
121
|
+
smalltalk.method({
|
122
|
+
selector: unescape('clear'),
|
123
|
+
category: 'printing',
|
124
|
+
fn: function (){
|
125
|
+
var self=this;
|
126
|
+
|
127
|
+
return self;},
|
128
|
+
args: [],
|
129
|
+
source: unescape('clear%0A%09%22no%20op%22'),
|
130
|
+
messageSends: [],
|
131
|
+
referencedClasses: []
|
132
|
+
}),
|
133
|
+
smalltalk.ConsoleTranscript);
|
134
|
+
|
135
|
+
smalltalk.addMethod(
|
136
|
+
unescape('_cr'),
|
137
|
+
smalltalk.method({
|
138
|
+
selector: unescape('cr'),
|
139
|
+
category: 'printing',
|
140
|
+
fn: function (){
|
141
|
+
var self=this;
|
142
|
+
|
143
|
+
return self;},
|
144
|
+
args: [],
|
145
|
+
source: unescape('cr%0A%09%22no%20op%22'),
|
146
|
+
messageSends: [],
|
147
|
+
referencedClasses: []
|
148
|
+
}),
|
149
|
+
smalltalk.ConsoleTranscript);
|
150
|
+
|
151
|
+
smalltalk.addMethod(
|
152
|
+
unescape('_show_'),
|
153
|
+
smalltalk.method({
|
154
|
+
selector: unescape('show%3A'),
|
155
|
+
category: 'printing',
|
156
|
+
fn: function (anObject){
|
157
|
+
var self=this;
|
158
|
+
var string=nil;
|
159
|
+
(string=smalltalk.send(anObject, "_asString", []));
|
160
|
+
console.log(String(string));
|
161
|
+
return self;},
|
162
|
+
args: ["anObject"],
|
163
|
+
source: unescape('show%3A%20anObject%0A%09%7C%20string%20%7C%0A%09string%20%3A%3D%20anObject%20asString.%0A%09%3Cconsole.log%28String%28string%29%29%3E'),
|
164
|
+
messageSends: ["asString"],
|
165
|
+
referencedClasses: []
|
166
|
+
}),
|
167
|
+
smalltalk.ConsoleTranscript);
|
168
|
+
|
169
|
+
smalltalk.addMethod(
|
170
|
+
unescape('_open'),
|
171
|
+
smalltalk.method({
|
172
|
+
selector: unescape('open'),
|
173
|
+
category: 'actions',
|
174
|
+
fn: function (){
|
175
|
+
var self=this;
|
176
|
+
|
177
|
+
return self;},
|
178
|
+
args: [],
|
179
|
+
source: unescape('open'),
|
180
|
+
messageSends: [],
|
181
|
+
referencedClasses: []
|
182
|
+
}),
|
183
|
+
smalltalk.ConsoleTranscript);
|
184
|
+
|
185
|
+
|
186
|
+
smalltalk.addMethod(
|
187
|
+
unescape('_initialize'),
|
188
|
+
smalltalk.method({
|
189
|
+
selector: unescape('initialize'),
|
190
|
+
category: 'initialization',
|
191
|
+
fn: function (){
|
192
|
+
var self=this;
|
193
|
+
smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
|
194
|
+
return self;},
|
195
|
+
args: [],
|
196
|
+
source: unescape('initialize%0A%09Transcript%20register%3A%20self%20new'),
|
197
|
+
messageSends: ["register:", "new"],
|
198
|
+
referencedClasses: ["Transcript"]
|
199
|
+
}),
|
200
|
+
smalltalk.ConsoleTranscript.klass);
|
201
|
+
|
202
|
+
|
@@ -0,0 +1,351 @@
|
|
1
|
+
smalltalk.addPackage('SUnit', {});
|
2
|
+
smalltalk.addClass('TestCase', smalltalk.Object, ['testSelector'], 'SUnit');
|
3
|
+
smalltalk.addMethod(
|
4
|
+
unescape('_setTestSelector_'),
|
5
|
+
smalltalk.method({
|
6
|
+
selector: unescape('setTestSelector%3A'),
|
7
|
+
fn: function (aSelector){
|
8
|
+
var self=this;
|
9
|
+
(self['@testSelector']=aSelector);
|
10
|
+
return self;}
|
11
|
+
}),
|
12
|
+
smalltalk.TestCase);
|
13
|
+
|
14
|
+
smalltalk.addMethod(
|
15
|
+
unescape('_selector'),
|
16
|
+
smalltalk.method({
|
17
|
+
selector: unescape('selector'),
|
18
|
+
fn: function (){
|
19
|
+
var self=this;
|
20
|
+
return self['@testSelector'];
|
21
|
+
return self;}
|
22
|
+
}),
|
23
|
+
smalltalk.TestCase);
|
24
|
+
|
25
|
+
smalltalk.addMethod(
|
26
|
+
unescape('_signalFailure_'),
|
27
|
+
smalltalk.method({
|
28
|
+
selector: unescape('signalFailure%3A'),
|
29
|
+
fn: function (aString){
|
30
|
+
var self=this;
|
31
|
+
(function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.TestFailure || TestFailure), "_new", []));
|
32
|
+
return self;}
|
33
|
+
}),
|
34
|
+
smalltalk.TestCase);
|
35
|
+
|
36
|
+
smalltalk.addMethod(
|
37
|
+
unescape('_setUp'),
|
38
|
+
smalltalk.method({
|
39
|
+
selector: unescape('setUp'),
|
40
|
+
fn: function (){
|
41
|
+
var self=this;
|
42
|
+
|
43
|
+
return self;}
|
44
|
+
}),
|
45
|
+
smalltalk.TestCase);
|
46
|
+
|
47
|
+
smalltalk.addMethod(
|
48
|
+
unescape('_tearDown'),
|
49
|
+
smalltalk.method({
|
50
|
+
selector: unescape('tearDown'),
|
51
|
+
fn: function (){
|
52
|
+
var self=this;
|
53
|
+
|
54
|
+
return self;}
|
55
|
+
}),
|
56
|
+
smalltalk.TestCase);
|
57
|
+
|
58
|
+
smalltalk.addMethod(
|
59
|
+
unescape('_runCaseFor_'),
|
60
|
+
smalltalk.method({
|
61
|
+
selector: unescape('runCaseFor%3A'),
|
62
|
+
fn: function (aTestResult){
|
63
|
+
var self=this;
|
64
|
+
smalltalk.send(self, "_setUp", []);
|
65
|
+
smalltalk.send(aTestResult, "_increaseRuns", []);
|
66
|
+
smalltalk.send(self, "_performTestFor_", [aTestResult]);
|
67
|
+
smalltalk.send(self, "_tearDown", []);
|
68
|
+
return self;}
|
69
|
+
}),
|
70
|
+
smalltalk.TestCase);
|
71
|
+
|
72
|
+
smalltalk.addMethod(
|
73
|
+
unescape('_performTestFor_'),
|
74
|
+
smalltalk.method({
|
75
|
+
selector: unescape('performTestFor%3A'),
|
76
|
+
fn: function (aResult){
|
77
|
+
var self=this;
|
78
|
+
smalltalk.send((function(){return smalltalk.send((function(){return smalltalk.send(self, "_perform_", [smalltalk.send(self, "_selector", [])]);}), "_on_do_", [(smalltalk.TestFailure || TestFailure), (function(ex){return smalltalk.send(aResult, "_addFailure_", [self]);})]);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return smalltalk.send(aResult, "_addError_", [self]);})]);
|
79
|
+
return self;}
|
80
|
+
}),
|
81
|
+
smalltalk.TestCase);
|
82
|
+
|
83
|
+
smalltalk.addMethod(
|
84
|
+
unescape('_assert_'),
|
85
|
+
smalltalk.method({
|
86
|
+
selector: unescape('assert%3A'),
|
87
|
+
fn: function (aBoolean){
|
88
|
+
var self=this;
|
89
|
+
smalltalk.send(self, "_assert_description_", [aBoolean, "Assertion failed"]);
|
90
|
+
return self;}
|
91
|
+
}),
|
92
|
+
smalltalk.TestCase);
|
93
|
+
|
94
|
+
smalltalk.addMethod(
|
95
|
+
unescape('_deny_'),
|
96
|
+
smalltalk.method({
|
97
|
+
selector: unescape('deny%3A'),
|
98
|
+
fn: function (aBoolean){
|
99
|
+
var self=this;
|
100
|
+
smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
|
101
|
+
return self;}
|
102
|
+
}),
|
103
|
+
smalltalk.TestCase);
|
104
|
+
|
105
|
+
smalltalk.addMethod(
|
106
|
+
unescape('_assert_equals_'),
|
107
|
+
smalltalk.method({
|
108
|
+
selector: unescape('assert%3Aequals%3A'),
|
109
|
+
fn: function (expected, actual){
|
110
|
+
var self=this;
|
111
|
+
return smalltalk.send(self, "_assert_description_", [smalltalk.send(expected, "__eq", [actual]), smalltalk.send(smalltalk.send(smalltalk.send("Expected: ", "__comma", [smalltalk.send(expected, "_asString", [])]), "__comma", [" but was: "]), "__comma", [smalltalk.send(actual, "_asString", [])])]);
|
112
|
+
return self;}
|
113
|
+
}),
|
114
|
+
smalltalk.TestCase);
|
115
|
+
|
116
|
+
smalltalk.addMethod(
|
117
|
+
unescape('_assert_description_'),
|
118
|
+
smalltalk.method({
|
119
|
+
selector: unescape('assert%3Adescription%3A'),
|
120
|
+
fn: function (aBoolean, aString){
|
121
|
+
var self=this;
|
122
|
+
((($receiver = aBoolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_signalFailure_", [aString]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_signalFailure_", [aString]);})]));
|
123
|
+
return self;}
|
124
|
+
}),
|
125
|
+
smalltalk.TestCase);
|
126
|
+
|
127
|
+
smalltalk.addMethod(
|
128
|
+
unescape('_should_'),
|
129
|
+
smalltalk.method({
|
130
|
+
selector: unescape('should%3A'),
|
131
|
+
fn: function (aBlock){
|
132
|
+
var self=this;
|
133
|
+
smalltalk.send(self, "_assert_", [smalltalk.send(aBlock, "_value", [])]);
|
134
|
+
return self;}
|
135
|
+
}),
|
136
|
+
smalltalk.TestCase);
|
137
|
+
|
138
|
+
smalltalk.addMethod(
|
139
|
+
unescape('_should_raise_'),
|
140
|
+
smalltalk.method({
|
141
|
+
selector: unescape('should%3Araise%3A'),
|
142
|
+
fn: function (aBlock, anExceptionClass){
|
143
|
+
var self=this;
|
144
|
+
smalltalk.send(self, "_assert_", [smalltalk.send((function(){smalltalk.send(aBlock, "_value", []);return false;}), "_on_do_", [anExceptionClass, (function(ex){return true;})])]);
|
145
|
+
return self;}
|
146
|
+
}),
|
147
|
+
smalltalk.TestCase);
|
148
|
+
|
149
|
+
|
150
|
+
smalltalk.addMethod(
|
151
|
+
unescape('_testSelectors'),
|
152
|
+
smalltalk.method({
|
153
|
+
selector: unescape('testSelectors'),
|
154
|
+
fn: function (){
|
155
|
+
var self=this;
|
156
|
+
return smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_select_", [(function(each){return smalltalk.send(each, "_match_", [unescape("%5Etest")]);})]);
|
157
|
+
return self;}
|
158
|
+
}),
|
159
|
+
smalltalk.TestCase.klass);
|
160
|
+
|
161
|
+
smalltalk.addMethod(
|
162
|
+
unescape('_selector_'),
|
163
|
+
smalltalk.method({
|
164
|
+
selector: unescape('selector%3A'),
|
165
|
+
fn: function (aSelector){
|
166
|
+
var self=this;
|
167
|
+
return (function($rec){smalltalk.send($rec, "_setTestSelector_", [aSelector]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
|
168
|
+
return self;}
|
169
|
+
}),
|
170
|
+
smalltalk.TestCase.klass);
|
171
|
+
|
172
|
+
smalltalk.addMethod(
|
173
|
+
unescape('_lookupHierarchyRoot'),
|
174
|
+
smalltalk.method({
|
175
|
+
selector: unescape('lookupHierarchyRoot'),
|
176
|
+
fn: function (){
|
177
|
+
var self=this;
|
178
|
+
return (smalltalk.TestCase || TestCase);
|
179
|
+
return self;}
|
180
|
+
}),
|
181
|
+
smalltalk.TestCase.klass);
|
182
|
+
|
183
|
+
smalltalk.addMethod(
|
184
|
+
unescape('_allTestSelectors'),
|
185
|
+
smalltalk.method({
|
186
|
+
selector: unescape('allTestSelectors'),
|
187
|
+
fn: function (){
|
188
|
+
var self=this;
|
189
|
+
var selectors=nil;
|
190
|
+
(selectors=smalltalk.send(self, "_testSelectors", []));
|
191
|
+
((($receiver = smalltalk.send(self, "_shouldInheritSelectors", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})]));
|
192
|
+
return selectors;
|
193
|
+
return self;}
|
194
|
+
}),
|
195
|
+
smalltalk.TestCase.klass);
|
196
|
+
|
197
|
+
smalltalk.addMethod(
|
198
|
+
unescape('_buildSuite'),
|
199
|
+
smalltalk.method({
|
200
|
+
selector: unescape('buildSuite'),
|
201
|
+
fn: function (){
|
202
|
+
var self=this;
|
203
|
+
return smalltalk.send(smalltalk.send(self, "_allTestSelectors", []), "_collect_", [(function(each){return smalltalk.send(self, "_selector_", [each]);})]);
|
204
|
+
return self;}
|
205
|
+
}),
|
206
|
+
smalltalk.TestCase.klass);
|
207
|
+
|
208
|
+
smalltalk.addMethod(
|
209
|
+
unescape('_shouldInheritSelectors'),
|
210
|
+
smalltalk.method({
|
211
|
+
selector: unescape('shouldInheritSelectors'),
|
212
|
+
fn: function (){
|
213
|
+
var self=this;
|
214
|
+
return smalltalk.send(self, "_~_eq", [smalltalk.send(self, "_lookupHierarchyRoot", [])]);
|
215
|
+
return self;}
|
216
|
+
}),
|
217
|
+
smalltalk.TestCase.klass);
|
218
|
+
|
219
|
+
|
220
|
+
smalltalk.addClass('TestFailure', smalltalk.Error, [], 'SUnit');
|
221
|
+
|
222
|
+
|
223
|
+
smalltalk.addClass('TestResult', smalltalk.Object, ['timestamp', 'runs', 'errors', 'failures', 'total'], 'SUnit');
|
224
|
+
smalltalk.addMethod(
|
225
|
+
unescape('_timestamp'),
|
226
|
+
smalltalk.method({
|
227
|
+
selector: unescape('timestamp'),
|
228
|
+
fn: function (){
|
229
|
+
var self=this;
|
230
|
+
return self['@timestamp'];
|
231
|
+
return self;}
|
232
|
+
}),
|
233
|
+
smalltalk.TestResult);
|
234
|
+
|
235
|
+
smalltalk.addMethod(
|
236
|
+
unescape('_errors'),
|
237
|
+
smalltalk.method({
|
238
|
+
selector: unescape('errors'),
|
239
|
+
fn: function (){
|
240
|
+
var self=this;
|
241
|
+
return self['@errors'];
|
242
|
+
return self;}
|
243
|
+
}),
|
244
|
+
smalltalk.TestResult);
|
245
|
+
|
246
|
+
smalltalk.addMethod(
|
247
|
+
unescape('_failures'),
|
248
|
+
smalltalk.method({
|
249
|
+
selector: unescape('failures'),
|
250
|
+
fn: function (){
|
251
|
+
var self=this;
|
252
|
+
return self['@failures'];
|
253
|
+
return self;}
|
254
|
+
}),
|
255
|
+
smalltalk.TestResult);
|
256
|
+
|
257
|
+
smalltalk.addMethod(
|
258
|
+
unescape('_total'),
|
259
|
+
smalltalk.method({
|
260
|
+
selector: unescape('total'),
|
261
|
+
fn: function (){
|
262
|
+
var self=this;
|
263
|
+
return self['@total'];
|
264
|
+
return self;}
|
265
|
+
}),
|
266
|
+
smalltalk.TestResult);
|
267
|
+
|
268
|
+
smalltalk.addMethod(
|
269
|
+
unescape('_total_'),
|
270
|
+
smalltalk.method({
|
271
|
+
selector: unescape('total%3A'),
|
272
|
+
fn: function (aNumber){
|
273
|
+
var self=this;
|
274
|
+
(self['@total']=aNumber);
|
275
|
+
return self;}
|
276
|
+
}),
|
277
|
+
smalltalk.TestResult);
|
278
|
+
|
279
|
+
smalltalk.addMethod(
|
280
|
+
unescape('_addError_'),
|
281
|
+
smalltalk.method({
|
282
|
+
selector: unescape('addError%3A'),
|
283
|
+
fn: function (anError){
|
284
|
+
var self=this;
|
285
|
+
smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
|
286
|
+
return self;}
|
287
|
+
}),
|
288
|
+
smalltalk.TestResult);
|
289
|
+
|
290
|
+
smalltalk.addMethod(
|
291
|
+
unescape('_addFailure_'),
|
292
|
+
smalltalk.method({
|
293
|
+
selector: unescape('addFailure%3A'),
|
294
|
+
fn: function (aFailure){
|
295
|
+
var self=this;
|
296
|
+
smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
|
297
|
+
return self;}
|
298
|
+
}),
|
299
|
+
smalltalk.TestResult);
|
300
|
+
|
301
|
+
smalltalk.addMethod(
|
302
|
+
unescape('_runs'),
|
303
|
+
smalltalk.method({
|
304
|
+
selector: unescape('runs'),
|
305
|
+
fn: function (){
|
306
|
+
var self=this;
|
307
|
+
return self['@runs'];
|
308
|
+
return self;}
|
309
|
+
}),
|
310
|
+
smalltalk.TestResult);
|
311
|
+
|
312
|
+
smalltalk.addMethod(
|
313
|
+
unescape('_increaseRuns'),
|
314
|
+
smalltalk.method({
|
315
|
+
selector: unescape('increaseRuns'),
|
316
|
+
fn: function (){
|
317
|
+
var self=this;
|
318
|
+
(self['@runs']=((($receiver = self['@runs']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
|
319
|
+
return self;}
|
320
|
+
}),
|
321
|
+
smalltalk.TestResult);
|
322
|
+
|
323
|
+
smalltalk.addMethod(
|
324
|
+
unescape('_status'),
|
325
|
+
smalltalk.method({
|
326
|
+
selector: unescape('status'),
|
327
|
+
fn: function (){
|
328
|
+
var self=this;
|
329
|
+
return ((($receiver = smalltalk.send(smalltalk.send(self, "_errors", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));})() : (function(){return "error";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));}), (function(){return "error";})]));
|
330
|
+
return self;}
|
331
|
+
}),
|
332
|
+
smalltalk.TestResult);
|
333
|
+
|
334
|
+
smalltalk.addMethod(
|
335
|
+
unescape('_initialize'),
|
336
|
+
smalltalk.method({
|
337
|
+
selector: unescape('initialize'),
|
338
|
+
fn: function (){
|
339
|
+
var self=this;
|
340
|
+
smalltalk.send(self, "_initialize", [], smalltalk.Object);
|
341
|
+
(self['@timestamp']=smalltalk.send((smalltalk.Date || Date), "_now", []));
|
342
|
+
(self['@runs']=(0));
|
343
|
+
(self['@errors']=smalltalk.send((smalltalk.Array || Array), "_new", []));
|
344
|
+
(self['@failures']=smalltalk.send((smalltalk.Array || Array), "_new", []));
|
345
|
+
(self['@total']=(0));
|
346
|
+
return self;}
|
347
|
+
}),
|
348
|
+
smalltalk.TestResult);
|
349
|
+
|
350
|
+
|
351
|
+
|