resin 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/amber/css/amber-normalize.css +73 -73
- data/amber/css/amber-normalize.less +1 -1
- data/amber/css/amber.css +106 -106
- data/amber/css/helios.css +242 -0
- data/amber/images/hsplitter.png +0 -0
- data/amber/images/vsplitter.png +0 -0
- data/amber/js/Benchfib.deploy.js +116 -38
- data/amber/js/Benchfib.js +120 -42
- data/amber/js/Canvas.deploy.js +674 -403
- data/amber/js/Canvas.js +682 -411
- data/amber/js/Compiler-AST.deploy.js +1150 -0
- data/amber/js/Compiler-AST.js +1591 -0
- data/amber/js/Compiler-Core.deploy.js +1562 -0
- data/amber/js/Compiler-Core.js +1972 -0
- data/amber/js/Compiler-Exceptions.deploy.js +114 -0
- data/amber/js/Compiler-Exceptions.js +161 -0
- data/amber/js/Compiler-IR.deploy.js +2326 -0
- data/amber/js/Compiler-IR.js +3146 -0
- data/amber/js/Compiler-Inlining.deploy.js +1147 -0
- data/amber/js/Compiler-Inlining.js +1514 -0
- data/amber/js/Compiler-Semantic.deploy.js +1207 -0
- data/amber/js/Compiler-Semantic.js +1628 -0
- data/amber/js/Compiler-Tests.deploy.js +646 -60
- data/amber/js/Compiler-Tests.js +843 -82
- data/amber/js/Compiler.deploy.js +1097 -159
- data/amber/js/Compiler.js +1414 -161
- data/amber/js/Examples.deploy.js +31 -15
- data/amber/js/Examples.js +33 -17
- data/amber/js/Helios-Announcements.deploy.js +127 -0
- data/amber/js/Helios-Announcements.js +157 -0
- data/amber/js/Helios-Browser.deploy.js +1473 -0
- data/amber/js/Helios-Browser.js +1953 -0
- data/amber/js/Helios-Commands.deploy.js +403 -0
- data/amber/js/Helios-Commands.js +563 -0
- data/amber/js/Helios-Core.deploy.js +1070 -0
- data/amber/js/Helios-Core.js +1445 -0
- data/amber/js/Helios-Environments.deploy.js +132 -0
- data/amber/js/Helios-Environments.js +179 -0
- data/amber/js/Helios-Inspector.deploy.js +855 -0
- data/amber/js/Helios-Inspector.js +1155 -0
- data/amber/js/Helios-KeyBindings.deploy.js +753 -0
- data/amber/js/Helios-KeyBindings.js +1023 -0
- data/amber/js/Helios-Layout.deploy.js +383 -0
- data/amber/js/Helios-Layout.js +523 -0
- data/amber/js/Helios-Workspace.deploy.js +799 -0
- data/amber/js/Helios-Workspace.js +1074 -0
- data/amber/js/IDE.deploy.js +2541 -1490
- data/amber/js/IDE.js +2721 -1660
- data/amber/js/Importer-Exporter.deploy.js +671 -0
- data/amber/js/Importer-Exporter.js +816 -0
- data/amber/js/Kernel-Announcements.deploy.js +137 -20
- data/amber/js/Kernel-Announcements.js +176 -22
- data/amber/js/Kernel-Classes.deploy.js +555 -168
- data/amber/js/Kernel-Classes.js +662 -205
- data/amber/js/Kernel-Collections.deploy.js +1403 -618
- data/amber/js/Kernel-Collections.js +1545 -690
- data/amber/js/Kernel-Exceptions.deploy.js +109 -45
- data/amber/js/Kernel-Exceptions.js +123 -49
- data/amber/js/Kernel-Methods.deploy.js +196 -81
- data/amber/js/Kernel-Methods.js +214 -89
- data/amber/js/Kernel-Objects.deploy.js +1542 -1117
- data/amber/js/Kernel-Objects.js +1593 -1148
- data/amber/js/Kernel-Tests.deploy.js +1725 -772
- data/amber/js/Kernel-Tests.js +2301 -1123
- data/amber/js/Kernel-Transcript.deploy.js +23 -25
- data/amber/js/Kernel-Transcript.js +24 -26
- data/amber/js/SUnit.deploy.js +204 -131
- data/amber/js/SUnit.js +222 -139
- data/amber/js/Spaces.deploy.js +240 -0
- data/amber/js/Spaces.js +326 -0
- data/amber/js/amber.js +26 -7
- data/amber/js/boot.js +65 -47
- data/amber/js/init.js +1 -1
- data/amber/js/lib/CodeMirror/amber.css +21 -21
- data/amber/js/lib/CodeMirror/codemirror.css +119 -13
- data/amber/js/lib/CodeMirror/codemirror.js +2219 -1220
- data/amber/js/lib/CodeMirror/smalltalk.js +134 -129
- data/amber/js/lib/bootstrap/css/bootstrap.css +5837 -0
- data/amber/js/lib/bootstrap/css/bootstrap.min.css +841 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/amber/js/lib/bootstrap/img/glyphicons-halflings.png +0 -0
- data/amber/js/lib/bootstrap/js/bootstrap.js +2038 -0
- data/amber/js/lib/bootstrap/js/bootstrap.min.js +7 -0
- data/amber/js/lib/jQuery/jquery-1.8.2.min.js +2 -0
- data/amber/js/lib/jQuery/jquery-ui-1.8.24.custom.min.js +125 -0
- data/amber/st/Compiler-AST.st +505 -0
- data/amber/st/Compiler-Core.st +835 -0
- data/amber/st/Compiler-Exceptions.st +87 -0
- data/amber/st/Compiler-IR.st +1097 -0
- data/amber/st/Compiler-Inlining.st +650 -0
- data/amber/st/Compiler-Semantic.st +558 -0
- data/amber/st/Compiler-Tests.st +285 -381
- data/amber/st/Compiler.st +725 -2
- data/amber/st/Helios-Announcements.st +104 -0
- data/amber/st/Helios-Browser.st +708 -0
- data/amber/st/Helios-Commands.st +223 -0
- data/amber/st/Helios-Core.st +532 -0
- data/amber/st/Helios-Environments.st +98 -0
- data/amber/st/Helios-Inspector.st +367 -0
- data/amber/st/Helios-KeyBindings.st +337 -0
- data/amber/st/Helios-Layout.st +199 -0
- data/amber/st/Helios-Workspace.st +367 -0
- data/amber/st/IDE.st +75 -53
- data/amber/st/Importer-Exporter.st +386 -0
- data/amber/st/Kernel-Announcements.st +92 -0
- data/amber/st/Kernel-Classes.st +137 -15
- data/amber/st/Kernel-Collections.st +137 -47
- data/amber/st/Kernel-Exceptions.st +14 -0
- data/amber/st/Kernel-Methods.st +9 -1
- data/amber/st/Kernel-Objects.st +29 -5
- data/amber/st/Kernel-Tests.st +545 -199
- data/amber/st/SUnit.st +10 -0
- data/amber/st/Spaces.st +142 -0
- data/lib/resin/app.rb +1 -1
- metadata +86 -31
- data/amber/js/lib/jQuery/jquery-1.4.4.min.js +0 -167
- data/amber/js/lib/jQuery/jquery-1.6.4.min.js +0 -4
@@ -6,8 +6,7 @@ smalltalk.method({
|
|
6
6
|
selector: "clear",
|
7
7
|
fn: function (){
|
8
8
|
var self=this;
|
9
|
-
|
10
|
-
return self;}
|
9
|
+
return self}
|
11
10
|
}),
|
12
11
|
smalltalk.ConsoleTranscript);
|
13
12
|
|
@@ -17,8 +16,7 @@ smalltalk.method({
|
|
17
16
|
selector: "cr",
|
18
17
|
fn: function (){
|
19
18
|
var self=this;
|
20
|
-
|
21
|
-
return self;}
|
19
|
+
return self}
|
22
20
|
}),
|
23
21
|
smalltalk.ConsoleTranscript);
|
24
22
|
|
@@ -28,8 +26,7 @@ smalltalk.method({
|
|
28
26
|
selector: "open",
|
29
27
|
fn: function (){
|
30
28
|
var self=this;
|
31
|
-
|
32
|
-
return self;}
|
29
|
+
return self}
|
33
30
|
}),
|
34
31
|
smalltalk.ConsoleTranscript);
|
35
32
|
|
@@ -39,10 +36,11 @@ smalltalk.method({
|
|
39
36
|
selector: "show:",
|
40
37
|
fn: function (anObject){
|
41
38
|
var self=this;
|
42
|
-
var string
|
43
|
-
|
39
|
+
var string;
|
40
|
+
string=smalltalk.send(anObject,"_asString",[]);
|
44
41
|
console.log(String(string));
|
45
|
-
|
42
|
+
;
|
43
|
+
return self}
|
46
44
|
}),
|
47
45
|
smalltalk.ConsoleTranscript);
|
48
46
|
|
@@ -53,8 +51,8 @@ smalltalk.method({
|
|
53
51
|
selector: "initialize",
|
54
52
|
fn: function (){
|
55
53
|
var self=this;
|
56
|
-
smalltalk.send((smalltalk.Transcript || Transcript),
|
57
|
-
return self
|
54
|
+
smalltalk.send((smalltalk.Transcript || Transcript),"_register_",[smalltalk.send(self,"_new",[])]);
|
55
|
+
return self}
|
58
56
|
}),
|
59
57
|
smalltalk.ConsoleTranscript.klass);
|
60
58
|
|
@@ -68,8 +66,8 @@ smalltalk.method({
|
|
68
66
|
selector: "clear",
|
69
67
|
fn: function (){
|
70
68
|
var self=this;
|
71
|
-
smalltalk.send(smalltalk.send(self,
|
72
|
-
return self
|
69
|
+
smalltalk.send(smalltalk.send(self,"_current",[]),"_clear",[]);
|
70
|
+
return self}
|
73
71
|
}),
|
74
72
|
smalltalk.Transcript.klass);
|
75
73
|
|
@@ -79,8 +77,8 @@ smalltalk.method({
|
|
79
77
|
selector: "cr",
|
80
78
|
fn: function (){
|
81
79
|
var self=this;
|
82
|
-
smalltalk.send(smalltalk.send(self,
|
83
|
-
return self
|
80
|
+
smalltalk.send(smalltalk.send(self,"_current",[]),"_show_",[smalltalk.send((smalltalk.String || String),"_cr",[])]);
|
81
|
+
return self}
|
84
82
|
}),
|
85
83
|
smalltalk.Transcript.klass);
|
86
84
|
|
@@ -90,8 +88,8 @@ smalltalk.method({
|
|
90
88
|
selector: "current",
|
91
89
|
fn: function (){
|
92
90
|
var self=this;
|
93
|
-
return self[
|
94
|
-
|
91
|
+
return self["@current"];
|
92
|
+
}
|
95
93
|
}),
|
96
94
|
smalltalk.Transcript.klass);
|
97
95
|
|
@@ -101,8 +99,8 @@ smalltalk.method({
|
|
101
99
|
selector: "new",
|
102
100
|
fn: function (){
|
103
101
|
var self=this;
|
104
|
-
smalltalk.send(self,
|
105
|
-
return self
|
102
|
+
smalltalk.send(self,"_shouldNotImplement",[]);
|
103
|
+
return self}
|
106
104
|
}),
|
107
105
|
smalltalk.Transcript.klass);
|
108
106
|
|
@@ -112,8 +110,8 @@ smalltalk.method({
|
|
112
110
|
selector: "open",
|
113
111
|
fn: function (){
|
114
112
|
var self=this;
|
115
|
-
smalltalk.send(smalltalk.send(self,
|
116
|
-
return self
|
113
|
+
smalltalk.send(smalltalk.send(self,"_current",[]),"_open",[]);
|
114
|
+
return self}
|
117
115
|
}),
|
118
116
|
smalltalk.Transcript.klass);
|
119
117
|
|
@@ -123,8 +121,8 @@ smalltalk.method({
|
|
123
121
|
selector: "register:",
|
124
122
|
fn: function (aTranscript){
|
125
123
|
var self=this;
|
126
|
-
|
127
|
-
return self
|
124
|
+
self["@current"]=aTranscript;
|
125
|
+
return self}
|
128
126
|
}),
|
129
127
|
smalltalk.Transcript.klass);
|
130
128
|
|
@@ -134,8 +132,8 @@ smalltalk.method({
|
|
134
132
|
selector: "show:",
|
135
133
|
fn: function (anObject){
|
136
134
|
var self=this;
|
137
|
-
smalltalk.send(smalltalk.send(self,
|
138
|
-
return self
|
135
|
+
smalltalk.send(smalltalk.send(self,"_current",[]),"_show_",[anObject]);
|
136
|
+
return self}
|
139
137
|
}),
|
140
138
|
smalltalk.Transcript.klass);
|
141
139
|
|
@@ -7,8 +7,7 @@ selector: "clear",
|
|
7
7
|
category: 'printing',
|
8
8
|
fn: function (){
|
9
9
|
var self=this;
|
10
|
-
|
11
|
-
return self;},
|
10
|
+
return self},
|
12
11
|
args: [],
|
13
12
|
source: "clear\x0a\x09\x22no op\x22",
|
14
13
|
messageSends: [],
|
@@ -23,8 +22,7 @@ selector: "cr",
|
|
23
22
|
category: 'printing',
|
24
23
|
fn: function (){
|
25
24
|
var self=this;
|
26
|
-
|
27
|
-
return self;},
|
25
|
+
return self},
|
28
26
|
args: [],
|
29
27
|
source: "cr\x0a\x09\x22no op\x22",
|
30
28
|
messageSends: [],
|
@@ -39,8 +37,7 @@ selector: "open",
|
|
39
37
|
category: 'actions',
|
40
38
|
fn: function (){
|
41
39
|
var self=this;
|
42
|
-
|
43
|
-
return self;},
|
40
|
+
return self},
|
44
41
|
args: [],
|
45
42
|
source: "open",
|
46
43
|
messageSends: [],
|
@@ -55,10 +52,11 @@ selector: "show:",
|
|
55
52
|
category: 'printing',
|
56
53
|
fn: function (anObject){
|
57
54
|
var self=this;
|
58
|
-
var string
|
59
|
-
|
55
|
+
var string;
|
56
|
+
string=smalltalk.send(anObject,"_asString",[]);
|
60
57
|
console.log(String(string));
|
61
|
-
|
58
|
+
;
|
59
|
+
return self},
|
62
60
|
args: ["anObject"],
|
63
61
|
source: "show: anObject\x0a\x09| string |\x0a\x09string := anObject asString.\x0a\x09<console.log(String(string))>",
|
64
62
|
messageSends: ["asString"],
|
@@ -74,8 +72,8 @@ selector: "initialize",
|
|
74
72
|
category: 'initialization',
|
75
73
|
fn: function (){
|
76
74
|
var self=this;
|
77
|
-
smalltalk.send((smalltalk.Transcript || Transcript),
|
78
|
-
return self
|
75
|
+
smalltalk.send((smalltalk.Transcript || Transcript),"_register_",[smalltalk.send(self,"_new",[])]);
|
76
|
+
return self},
|
79
77
|
args: [],
|
80
78
|
source: "initialize\x0a\x09Transcript register: self new",
|
81
79
|
messageSends: ["register:", "new"],
|
@@ -94,8 +92,8 @@ selector: "clear",
|
|
94
92
|
category: 'printing',
|
95
93
|
fn: function (){
|
96
94
|
var self=this;
|
97
|
-
smalltalk.send(smalltalk.send(self,
|
98
|
-
return self
|
95
|
+
smalltalk.send(smalltalk.send(self,"_current",[]),"_clear",[]);
|
96
|
+
return self},
|
99
97
|
args: [],
|
100
98
|
source: "clear\x0a self current clear",
|
101
99
|
messageSends: ["clear", "current"],
|
@@ -110,11 +108,11 @@ selector: "cr",
|
|
110
108
|
category: 'printing',
|
111
109
|
fn: function (){
|
112
110
|
var self=this;
|
113
|
-
smalltalk.send(smalltalk.send(self,
|
114
|
-
return self
|
111
|
+
smalltalk.send(smalltalk.send(self,"_current",[]),"_show_",[smalltalk.send((smalltalk.String || String),"_cr",[])]);
|
112
|
+
return self},
|
115
113
|
args: [],
|
116
114
|
source: "cr\x0a self current show: String cr",
|
117
|
-
messageSends: ["show:", "
|
115
|
+
messageSends: ["show:", "cr", "current"],
|
118
116
|
referencedClasses: ["String"]
|
119
117
|
}),
|
120
118
|
smalltalk.Transcript.klass);
|
@@ -126,8 +124,8 @@ selector: "current",
|
|
126
124
|
category: 'instance creation',
|
127
125
|
fn: function (){
|
128
126
|
var self=this;
|
129
|
-
return self[
|
130
|
-
|
127
|
+
return self["@current"];
|
128
|
+
},
|
131
129
|
args: [],
|
132
130
|
source: "current\x0a ^current",
|
133
131
|
messageSends: [],
|
@@ -142,8 +140,8 @@ selector: "new",
|
|
142
140
|
category: 'instance creation',
|
143
141
|
fn: function (){
|
144
142
|
var self=this;
|
145
|
-
smalltalk.send(self,
|
146
|
-
return self
|
143
|
+
smalltalk.send(self,"_shouldNotImplement",[]);
|
144
|
+
return self},
|
147
145
|
args: [],
|
148
146
|
source: "new\x0a self shouldNotImplement",
|
149
147
|
messageSends: ["shouldNotImplement"],
|
@@ -158,8 +156,8 @@ selector: "open",
|
|
158
156
|
category: 'instance creation',
|
159
157
|
fn: function (){
|
160
158
|
var self=this;
|
161
|
-
smalltalk.send(smalltalk.send(self,
|
162
|
-
return self
|
159
|
+
smalltalk.send(smalltalk.send(self,"_current",[]),"_open",[]);
|
160
|
+
return self},
|
163
161
|
args: [],
|
164
162
|
source: "open\x0a self current open",
|
165
163
|
messageSends: ["open", "current"],
|
@@ -174,8 +172,8 @@ selector: "register:",
|
|
174
172
|
category: 'instance creation',
|
175
173
|
fn: function (aTranscript){
|
176
174
|
var self=this;
|
177
|
-
|
178
|
-
return self
|
175
|
+
self["@current"]=aTranscript;
|
176
|
+
return self},
|
179
177
|
args: ["aTranscript"],
|
180
178
|
source: "register: aTranscript\x0a\x09current := aTranscript",
|
181
179
|
messageSends: [],
|
@@ -190,8 +188,8 @@ selector: "show:",
|
|
190
188
|
category: 'printing',
|
191
189
|
fn: function (anObject){
|
192
190
|
var self=this;
|
193
|
-
smalltalk.send(smalltalk.send(self,
|
194
|
-
return self
|
191
|
+
smalltalk.send(smalltalk.send(self,"_current",[]),"_show_",[anObject]);
|
192
|
+
return self},
|
195
193
|
args: ["anObject"],
|
196
194
|
source: "show: anObject\x0a self current show: anObject",
|
197
195
|
messageSends: ["show:", "current"],
|
data/amber/js/SUnit.deploy.js
CHANGED
@@ -4,10 +4,11 @@ smalltalk.addMethod(
|
|
4
4
|
"_assert_",
|
5
5
|
smalltalk.method({
|
6
6
|
selector: "assert:",
|
7
|
-
fn: function (aBoolean){
|
8
|
-
var self=this;
|
9
|
-
smalltalk.send(self, "_assert_description_", [aBoolean, "Assertion failed"]);
|
10
|
-
return self;
|
7
|
+
fn: function (aBoolean) {
|
8
|
+
var self = this;
|
9
|
+
smalltalk.send(self, "_assert_description_", [aBoolean, "Assertion failed"]);
|
10
|
+
return self;
|
11
|
+
}
|
11
12
|
}),
|
12
13
|
smalltalk.TestCase);
|
13
14
|
|
@@ -15,10 +16,13 @@ smalltalk.addMethod(
|
|
15
16
|
"_assert_description_",
|
16
17
|
smalltalk.method({
|
17
18
|
selector: "assert:description:",
|
18
|
-
fn: function (aBoolean, aString){
|
19
|
-
var self=this;
|
20
|
-
|
21
|
-
|
19
|
+
fn: function (aBoolean, aString) {
|
20
|
+
var self = this;
|
21
|
+
if (!smalltalk.assert(aBoolean)) {
|
22
|
+
smalltalk.send(self, "_signalFailure_", [aString]);
|
23
|
+
}
|
24
|
+
return self;
|
25
|
+
}
|
22
26
|
}),
|
23
27
|
smalltalk.TestCase);
|
24
28
|
|
@@ -26,10 +30,12 @@ smalltalk.addMethod(
|
|
26
30
|
"_assert_equals_",
|
27
31
|
smalltalk.method({
|
28
32
|
selector: "assert:equals:",
|
29
|
-
fn: function (expected, actual){
|
30
|
-
var self=this;
|
31
|
-
|
32
|
-
|
33
|
+
fn: function (expected, actual) {
|
34
|
+
var self = this;
|
35
|
+
var $1;
|
36
|
+
$1 = 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", [])])]);
|
37
|
+
return $1;
|
38
|
+
}
|
33
39
|
}),
|
34
40
|
smalltalk.TestCase);
|
35
41
|
|
@@ -37,10 +43,11 @@ smalltalk.addMethod(
|
|
37
43
|
"_deny_",
|
38
44
|
smalltalk.method({
|
39
45
|
selector: "deny:",
|
40
|
-
fn: function (aBoolean){
|
41
|
-
var self=this;
|
42
|
-
smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
|
43
|
-
return self;
|
46
|
+
fn: function (aBoolean) {
|
47
|
+
var self = this;
|
48
|
+
smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
|
49
|
+
return self;
|
50
|
+
}
|
44
51
|
}),
|
45
52
|
smalltalk.TestCase);
|
46
53
|
|
@@ -48,10 +55,11 @@ smalltalk.addMethod(
|
|
48
55
|
"_performTestFor_",
|
49
56
|
smalltalk.method({
|
50
57
|
selector: "performTestFor:",
|
51
|
-
fn: function (aResult){
|
52
|
-
var self=this;
|
53
|
-
smalltalk.send(
|
54
|
-
return self;
|
58
|
+
fn: function (aResult) {
|
59
|
+
var self = this;
|
60
|
+
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]);}]);
|
61
|
+
return self;
|
62
|
+
}
|
55
63
|
}),
|
56
64
|
smalltalk.TestCase);
|
57
65
|
|
@@ -59,13 +67,14 @@ smalltalk.addMethod(
|
|
59
67
|
"_runCaseFor_",
|
60
68
|
smalltalk.method({
|
61
69
|
selector: "runCaseFor:",
|
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;
|
70
|
+
fn: function (aTestResult) {
|
71
|
+
var self = this;
|
72
|
+
smalltalk.send(self, "_setUp", []);
|
73
|
+
smalltalk.send(aTestResult, "_increaseRuns", []);
|
74
|
+
smalltalk.send(self, "_performTestFor_", [aTestResult]);
|
75
|
+
smalltalk.send(self, "_tearDown", []);
|
76
|
+
return self;
|
77
|
+
}
|
69
78
|
}),
|
70
79
|
smalltalk.TestCase);
|
71
80
|
|
@@ -73,10 +82,10 @@ smalltalk.addMethod(
|
|
73
82
|
"_selector",
|
74
83
|
smalltalk.method({
|
75
84
|
selector: "selector",
|
76
|
-
fn: function (){
|
77
|
-
var self=this;
|
78
|
-
return self['@testSelector'];
|
79
|
-
|
85
|
+
fn: function () {
|
86
|
+
var self = this;
|
87
|
+
return self['@testSelector'];
|
88
|
+
}
|
80
89
|
}),
|
81
90
|
smalltalk.TestCase);
|
82
91
|
|
@@ -84,10 +93,11 @@ smalltalk.addMethod(
|
|
84
93
|
"_setTestSelector_",
|
85
94
|
smalltalk.method({
|
86
95
|
selector: "setTestSelector:",
|
87
|
-
fn: function (aSelector){
|
88
|
-
var self=this;
|
89
|
-
|
90
|
-
return self;
|
96
|
+
fn: function (aSelector) {
|
97
|
+
var self = this;
|
98
|
+
self['@testSelector'] = aSelector;
|
99
|
+
return self;
|
100
|
+
}
|
91
101
|
}),
|
92
102
|
smalltalk.TestCase);
|
93
103
|
|
@@ -95,10 +105,10 @@ smalltalk.addMethod(
|
|
95
105
|
"_setUp",
|
96
106
|
smalltalk.method({
|
97
107
|
selector: "setUp",
|
98
|
-
fn: function (){
|
99
|
-
var self=this;
|
100
|
-
|
101
|
-
|
108
|
+
fn: function () {
|
109
|
+
var self = this;
|
110
|
+
return self;
|
111
|
+
}
|
102
112
|
}),
|
103
113
|
smalltalk.TestCase);
|
104
114
|
|
@@ -106,10 +116,11 @@ smalltalk.addMethod(
|
|
106
116
|
"_should_",
|
107
117
|
smalltalk.method({
|
108
118
|
selector: "should:",
|
109
|
-
fn: function (aBlock){
|
110
|
-
var self=this;
|
111
|
-
smalltalk.send(self, "_assert_", [smalltalk.send(aBlock, "_value", [])]);
|
112
|
-
return self;
|
119
|
+
fn: function (aBlock) {
|
120
|
+
var self = this;
|
121
|
+
smalltalk.send(self, "_assert_", [smalltalk.send(aBlock, "_value", [])]);
|
122
|
+
return self;
|
123
|
+
}
|
113
124
|
}),
|
114
125
|
smalltalk.TestCase);
|
115
126
|
|
@@ -117,10 +128,23 @@ smalltalk.addMethod(
|
|
117
128
|
"_should_raise_",
|
118
129
|
smalltalk.method({
|
119
130
|
selector: "should:raise:",
|
120
|
-
fn: function (aBlock, anExceptionClass){
|
121
|
-
var self=this;
|
122
|
-
smalltalk.send(self, "_assert_", [smalltalk.send(
|
123
|
-
return self;
|
131
|
+
fn: function (aBlock, anExceptionClass) {
|
132
|
+
var self = this;
|
133
|
+
smalltalk.send(self, "_assert_", [smalltalk.send(function () {smalltalk.send(aBlock, "_value", []);return false;}, "_on_do_", [anExceptionClass, function (ex) {return true;}])]);
|
134
|
+
return self;
|
135
|
+
}
|
136
|
+
}),
|
137
|
+
smalltalk.TestCase);
|
138
|
+
|
139
|
+
smalltalk.addMethod(
|
140
|
+
"_shouldnt_raise_",
|
141
|
+
smalltalk.method({
|
142
|
+
selector: "shouldnt:raise:",
|
143
|
+
fn: function (aBlock, anExceptionClass) {
|
144
|
+
var self = this;
|
145
|
+
smalltalk.send(self, "_assert_", [smalltalk.send(function () {smalltalk.send(aBlock, "_value", []);return true;}, "_on_do_", [anExceptionClass, function (ex) {return false;}])]);
|
146
|
+
return self;
|
147
|
+
}
|
124
148
|
}),
|
125
149
|
smalltalk.TestCase);
|
126
150
|
|
@@ -128,10 +152,14 @@ smalltalk.addMethod(
|
|
128
152
|
"_signalFailure_",
|
129
153
|
smalltalk.method({
|
130
154
|
selector: "signalFailure:",
|
131
|
-
fn: function (aString){
|
132
|
-
var self=this;
|
133
|
-
|
134
|
-
|
155
|
+
fn: function (aString) {
|
156
|
+
var self = this;
|
157
|
+
var $1, $2;
|
158
|
+
$1 = smalltalk.send(smalltalk.TestFailure || TestFailure, "_new", []);
|
159
|
+
smalltalk.send($1, "_messageText_", [aString]);
|
160
|
+
$2 = smalltalk.send($1, "_signal", []);
|
161
|
+
return self;
|
162
|
+
}
|
135
163
|
}),
|
136
164
|
smalltalk.TestCase);
|
137
165
|
|
@@ -139,10 +167,10 @@ smalltalk.addMethod(
|
|
139
167
|
"_tearDown",
|
140
168
|
smalltalk.method({
|
141
169
|
selector: "tearDown",
|
142
|
-
fn: function (){
|
143
|
-
var self=this;
|
144
|
-
|
145
|
-
|
170
|
+
fn: function () {
|
171
|
+
var self = this;
|
172
|
+
return self;
|
173
|
+
}
|
146
174
|
}),
|
147
175
|
smalltalk.TestCase);
|
148
176
|
|
@@ -151,13 +179,17 @@ smalltalk.addMethod(
|
|
151
179
|
"_allTestSelectors",
|
152
180
|
smalltalk.method({
|
153
181
|
selector: "allTestSelectors",
|
154
|
-
fn: function (){
|
155
|
-
var self=this;
|
156
|
-
var
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
182
|
+
fn: function () {
|
183
|
+
var self = this;
|
184
|
+
var $1;
|
185
|
+
var selectors;
|
186
|
+
selectors = smalltalk.send(self, "_testSelectors", []);
|
187
|
+
$1 = smalltalk.send(self, "_shouldInheritSelectors", []);
|
188
|
+
if (smalltalk.assert($1)) {
|
189
|
+
smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);
|
190
|
+
}
|
191
|
+
return selectors;
|
192
|
+
}
|
161
193
|
}),
|
162
194
|
smalltalk.TestCase.klass);
|
163
195
|
|
@@ -165,10 +197,25 @@ smalltalk.addMethod(
|
|
165
197
|
"_buildSuite",
|
166
198
|
smalltalk.method({
|
167
199
|
selector: "buildSuite",
|
168
|
-
fn: function (){
|
169
|
-
var self=this;
|
170
|
-
|
171
|
-
return self;}
|
200
|
+
fn: function () {
|
201
|
+
var self = this;
|
202
|
+
var $1;
|
203
|
+
$1 = smalltalk.send(smalltalk.send(self, "_allTestSelectors", []), "_collect_", [function (each) {return smalltalk.send(self, "_selector_", [each]);}]);
|
204
|
+
return $1;
|
205
|
+
}
|
206
|
+
}),
|
207
|
+
smalltalk.TestCase.klass);
|
208
|
+
|
209
|
+
smalltalk.addMethod(
|
210
|
+
"_isAbstract",
|
211
|
+
smalltalk.method({
|
212
|
+
selector: "isAbstract",
|
213
|
+
fn: function () {
|
214
|
+
var self = this;
|
215
|
+
var $1;
|
216
|
+
$1 = smalltalk.send(smalltalk.send(self, "_name", []), "__eq", ["TestCase"]);
|
217
|
+
return $1;
|
218
|
+
}
|
172
219
|
}),
|
173
220
|
smalltalk.TestCase.klass);
|
174
221
|
|
@@ -176,10 +223,10 @@ smalltalk.addMethod(
|
|
176
223
|
"_lookupHierarchyRoot",
|
177
224
|
smalltalk.method({
|
178
225
|
selector: "lookupHierarchyRoot",
|
179
|
-
fn: function (){
|
180
|
-
var self=this;
|
181
|
-
return
|
182
|
-
|
226
|
+
fn: function () {
|
227
|
+
var self = this;
|
228
|
+
return smalltalk.TestCase || TestCase;
|
229
|
+
}
|
183
230
|
}),
|
184
231
|
smalltalk.TestCase.klass);
|
185
232
|
|
@@ -187,10 +234,15 @@ smalltalk.addMethod(
|
|
187
234
|
"_selector_",
|
188
235
|
smalltalk.method({
|
189
236
|
selector: "selector:",
|
190
|
-
fn: function (aSelector){
|
191
|
-
var self=this;
|
192
|
-
|
193
|
-
|
237
|
+
fn: function (aSelector) {
|
238
|
+
var self = this;
|
239
|
+
var $2, $3, $1;
|
240
|
+
$2 = smalltalk.send(self, "_new", []);
|
241
|
+
smalltalk.send($2, "_setTestSelector_", [aSelector]);
|
242
|
+
$3 = smalltalk.send($2, "_yourself", []);
|
243
|
+
$1 = $3;
|
244
|
+
return $1;
|
245
|
+
}
|
194
246
|
}),
|
195
247
|
smalltalk.TestCase.klass);
|
196
248
|
|
@@ -198,10 +250,12 @@ smalltalk.addMethod(
|
|
198
250
|
"_shouldInheritSelectors",
|
199
251
|
smalltalk.method({
|
200
252
|
selector: "shouldInheritSelectors",
|
201
|
-
fn: function (){
|
202
|
-
var self=this;
|
203
|
-
|
204
|
-
|
253
|
+
fn: function () {
|
254
|
+
var self = this;
|
255
|
+
var $1;
|
256
|
+
$1 = smalltalk.send(self, "_~_eq", [smalltalk.send(self, "_lookupHierarchyRoot", [])]);
|
257
|
+
return $1;
|
258
|
+
}
|
205
259
|
}),
|
206
260
|
smalltalk.TestCase.klass);
|
207
261
|
|
@@ -209,10 +263,12 @@ smalltalk.addMethod(
|
|
209
263
|
"_testSelectors",
|
210
264
|
smalltalk.method({
|
211
265
|
selector: "testSelectors",
|
212
|
-
fn: function (){
|
213
|
-
var self=this;
|
214
|
-
|
215
|
-
return
|
266
|
+
fn: function () {
|
267
|
+
var self = this;
|
268
|
+
var $1;
|
269
|
+
$1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_select_", [function (each) {return smalltalk.send(each, "_match_", ["^test"]);}]);
|
270
|
+
return $1;
|
271
|
+
}
|
216
272
|
}),
|
217
273
|
smalltalk.TestCase.klass);
|
218
274
|
|
@@ -225,10 +281,11 @@ smalltalk.addMethod(
|
|
225
281
|
"_addError_",
|
226
282
|
smalltalk.method({
|
227
283
|
selector: "addError:",
|
228
|
-
fn: function (anError){
|
229
|
-
var self=this;
|
230
|
-
smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
|
231
|
-
return self;
|
284
|
+
fn: function (anError) {
|
285
|
+
var self = this;
|
286
|
+
smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
|
287
|
+
return self;
|
288
|
+
}
|
232
289
|
}),
|
233
290
|
smalltalk.TestResult);
|
234
291
|
|
@@ -236,10 +293,11 @@ smalltalk.addMethod(
|
|
236
293
|
"_addFailure_",
|
237
294
|
smalltalk.method({
|
238
295
|
selector: "addFailure:",
|
239
|
-
fn: function (aFailure){
|
240
|
-
var self=this;
|
241
|
-
smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
|
242
|
-
return self;
|
296
|
+
fn: function (aFailure) {
|
297
|
+
var self = this;
|
298
|
+
smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
|
299
|
+
return self;
|
300
|
+
}
|
243
301
|
}),
|
244
302
|
smalltalk.TestResult);
|
245
303
|
|
@@ -247,10 +305,10 @@ smalltalk.addMethod(
|
|
247
305
|
"_errors",
|
248
306
|
smalltalk.method({
|
249
307
|
selector: "errors",
|
250
|
-
fn: function (){
|
251
|
-
var self=this;
|
252
|
-
return self['@errors'];
|
253
|
-
|
308
|
+
fn: function () {
|
309
|
+
var self = this;
|
310
|
+
return self['@errors'];
|
311
|
+
}
|
254
312
|
}),
|
255
313
|
smalltalk.TestResult);
|
256
314
|
|
@@ -258,10 +316,10 @@ smalltalk.addMethod(
|
|
258
316
|
"_failures",
|
259
317
|
smalltalk.method({
|
260
318
|
selector: "failures",
|
261
|
-
fn: function (){
|
262
|
-
var self=this;
|
263
|
-
return self['@failures'];
|
264
|
-
|
319
|
+
fn: function () {
|
320
|
+
var self = this;
|
321
|
+
return self['@failures'];
|
322
|
+
}
|
265
323
|
}),
|
266
324
|
smalltalk.TestResult);
|
267
325
|
|
@@ -269,10 +327,11 @@ smalltalk.addMethod(
|
|
269
327
|
"_increaseRuns",
|
270
328
|
smalltalk.method({
|
271
329
|
selector: "increaseRuns",
|
272
|
-
fn: function (){
|
273
|
-
var self=this;
|
274
|
-
|
275
|
-
return self;
|
330
|
+
fn: function () {
|
331
|
+
var self = this;
|
332
|
+
self['@runs'] = smalltalk.send(self['@runs'], "__plus", [1]);
|
333
|
+
return self;
|
334
|
+
}
|
276
335
|
}),
|
277
336
|
smalltalk.TestResult);
|
278
337
|
|
@@ -280,15 +339,16 @@ smalltalk.addMethod(
|
|
280
339
|
"_initialize",
|
281
340
|
smalltalk.method({
|
282
341
|
selector: "initialize",
|
283
|
-
fn: function (){
|
284
|
-
var self=this;
|
285
|
-
smalltalk.send(self, "_initialize", [], smalltalk.
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
return self;
|
342
|
+
fn: function () {
|
343
|
+
var self = this;
|
344
|
+
smalltalk.send(self, "_initialize", [], smalltalk.Object);
|
345
|
+
self['@timestamp'] = smalltalk.send(smalltalk.Date || Date, "_now", []);
|
346
|
+
self['@runs'] = 0;
|
347
|
+
self['@errors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
|
348
|
+
self['@failures'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
|
349
|
+
self['@total'] = 0;
|
350
|
+
return self;
|
351
|
+
}
|
292
352
|
}),
|
293
353
|
smalltalk.TestResult);
|
294
354
|
|
@@ -296,10 +356,10 @@ smalltalk.addMethod(
|
|
296
356
|
"_runs",
|
297
357
|
smalltalk.method({
|
298
358
|
selector: "runs",
|
299
|
-
fn: function (){
|
300
|
-
var self=this;
|
301
|
-
return self['@runs'];
|
302
|
-
|
359
|
+
fn: function () {
|
360
|
+
var self = this;
|
361
|
+
return self['@runs'];
|
362
|
+
}
|
303
363
|
}),
|
304
364
|
smalltalk.TestResult);
|
305
365
|
|
@@ -307,10 +367,22 @@ smalltalk.addMethod(
|
|
307
367
|
"_status",
|
308
368
|
smalltalk.method({
|
309
369
|
selector: "status",
|
310
|
-
fn: function (){
|
311
|
-
var self=this;
|
312
|
-
|
313
|
-
|
370
|
+
fn: function () {
|
371
|
+
var self = this;
|
372
|
+
var $2, $3, $1;
|
373
|
+
$2 = smalltalk.send(smalltalk.send(self, "_errors", []), "_isEmpty", []);
|
374
|
+
if (smalltalk.assert($2)) {
|
375
|
+
$3 = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", []);
|
376
|
+
if (smalltalk.assert($3)) {
|
377
|
+
$1 = "success";
|
378
|
+
} else {
|
379
|
+
$1 = "failure";
|
380
|
+
}
|
381
|
+
} else {
|
382
|
+
$1 = "error";
|
383
|
+
}
|
384
|
+
return $1;
|
385
|
+
}
|
314
386
|
}),
|
315
387
|
smalltalk.TestResult);
|
316
388
|
|
@@ -318,10 +390,10 @@ smalltalk.addMethod(
|
|
318
390
|
"_timestamp",
|
319
391
|
smalltalk.method({
|
320
392
|
selector: "timestamp",
|
321
|
-
fn: function (){
|
322
|
-
var self=this;
|
323
|
-
return self['@timestamp'];
|
324
|
-
|
393
|
+
fn: function () {
|
394
|
+
var self = this;
|
395
|
+
return self['@timestamp'];
|
396
|
+
}
|
325
397
|
}),
|
326
398
|
smalltalk.TestResult);
|
327
399
|
|
@@ -329,10 +401,10 @@ smalltalk.addMethod(
|
|
329
401
|
"_total",
|
330
402
|
smalltalk.method({
|
331
403
|
selector: "total",
|
332
|
-
fn: function (){
|
333
|
-
var self=this;
|
334
|
-
return self['@total'];
|
335
|
-
|
404
|
+
fn: function () {
|
405
|
+
var self = this;
|
406
|
+
return self['@total'];
|
407
|
+
}
|
336
408
|
}),
|
337
409
|
smalltalk.TestResult);
|
338
410
|
|
@@ -340,10 +412,11 @@ smalltalk.addMethod(
|
|
340
412
|
"_total_",
|
341
413
|
smalltalk.method({
|
342
414
|
selector: "total:",
|
343
|
-
fn: function (aNumber){
|
344
|
-
var self=this;
|
345
|
-
|
346
|
-
return self;
|
415
|
+
fn: function (aNumber) {
|
416
|
+
var self = this;
|
417
|
+
self['@total'] = aNumber;
|
418
|
+
return self;
|
419
|
+
}
|
347
420
|
}),
|
348
421
|
smalltalk.TestResult);
|
349
422
|
|