Skip to content

Commit 78e79a9

Browse files
committed
updated tests for Node v6.0.0
1 parent 5c0b9a3 commit 78e79a9

16 files changed

Lines changed: 2683 additions & 432 deletions

‎v4-cokapi/backends/javascript/tests/assert-fail-exception.golden‎

Lines changed: 128 additions & 72 deletions
Large diffs are not rendered by default.

‎v4-cokapi/backends/javascript/tests/basic-funcs.golden‎

Lines changed: 111 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,33 @@
7171
i: [ 'JS_SPECIAL_VAL', 'undefined' ] },
7272
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
7373
line: 19,
74-
col: 0,
74+
col: 5,
75+
event: 'step_line',
76+
heap:
77+
{ '1':
78+
[ 'JS_FUNCTION',
79+
'bar',
80+
'function bar(i) {\n var obj_lst = [i, {foo: i+1, poop: [1, 2, 3]}, {bar: i+2}];\n}',
81+
null,
82+
null ],
83+
'2':
84+
[ 'JS_FUNCTION',
85+
'',
86+
'function (i) {\n var local_x = 42;\n var local_y = "hello world";\n var local_z = true;\n var local_w = false;\n var local_q = null;\n console.log(\'foo:\', i*i);\n bar(i);\n return (local_x * local_x);\n}',
87+
null,
88+
null ] } },
89+
{ stdout: '',
90+
func_name: '',
91+
stack_to_render: [],
92+
globals:
93+
{ global_x: 5,
94+
global_y: 10,
95+
foo: [ 'REF', 2 ],
96+
bar: [ 'REF', 1 ],
97+
i: 0 },
98+
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
99+
line: 19,
100+
col: 15,
75101
event: 'step_line',
76102
heap:
77103
{ '1':
@@ -97,7 +123,7 @@
97123
i: 0 },
98124
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
99125
line: 20,
100-
col: 6,
126+
col: 2,
101127
event: 'step_line',
102128
heap:
103129
{ '1':
@@ -607,7 +633,33 @@
607633
i: 0 },
608634
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
609635
line: 19,
610-
col: 19,
636+
col: 20,
637+
event: 'step_line',
638+
heap:
639+
{ '1':
640+
[ 'JS_FUNCTION',
641+
'bar',
642+
'function bar(i) {\n var obj_lst = [i, {foo: i+1, poop: [1, 2, 3]}, {bar: i+2}];\n}',
643+
null,
644+
null ],
645+
'2':
646+
[ 'JS_FUNCTION',
647+
'',
648+
'function (i) {\n var local_x = 42;\n var local_y = "hello world";\n var local_z = true;\n var local_w = false;\n var local_q = null;\n console.log(\'foo:\', i*i);\n bar(i);\n return (local_x * local_x);\n}',
649+
null,
650+
null ] } },
651+
{ stdout: 'foo: 0\n',
652+
func_name: '',
653+
stack_to_render: [],
654+
globals:
655+
{ global_x: 5,
656+
global_y: 10,
657+
foo: [ 'REF', 2 ],
658+
bar: [ 'REF', 1 ],
659+
i: 1 },
660+
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
661+
line: 19,
662+
col: 15,
611663
event: 'step_line',
612664
heap:
613665
{ '1':
@@ -633,7 +685,7 @@
633685
i: 1 },
634686
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
635687
line: 20,
636-
col: 6,
688+
col: 2,
637689
event: 'step_line',
638690
heap:
639691
{ '1':
@@ -1143,7 +1195,33 @@
11431195
i: 1 },
11441196
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
11451197
line: 19,
1146-
col: 19,
1198+
col: 20,
1199+
event: 'step_line',
1200+
heap:
1201+
{ '1':
1202+
[ 'JS_FUNCTION',
1203+
'bar',
1204+
'function bar(i) {\n var obj_lst = [i, {foo: i+1, poop: [1, 2, 3]}, {bar: i+2}];\n}',
1205+
null,
1206+
null ],
1207+
'2':
1208+
[ 'JS_FUNCTION',
1209+
'',
1210+
'function (i) {\n var local_x = 42;\n var local_y = "hello world";\n var local_z = true;\n var local_w = false;\n var local_q = null;\n console.log(\'foo:\', i*i);\n bar(i);\n return (local_x * local_x);\n}',
1211+
null,
1212+
null ] } },
1213+
{ stdout: 'foo: 0\nfoo: 1\n',
1214+
func_name: '',
1215+
stack_to_render: [],
1216+
globals:
1217+
{ global_x: 5,
1218+
global_y: 10,
1219+
foo: [ 'REF', 2 ],
1220+
bar: [ 'REF', 1 ],
1221+
i: 2 },
1222+
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
1223+
line: 19,
1224+
col: 15,
11471225
event: 'step_line',
11481226
heap:
11491227
{ '1':
@@ -1169,7 +1247,7 @@
11691247
i: 2 },
11701248
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
11711249
line: 20,
1172-
col: 6,
1250+
col: 2,
11731251
event: 'step_line',
11741252
heap:
11751253
{ '1':
@@ -1679,7 +1757,33 @@
16791757
i: 2 },
16801758
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
16811759
line: 19,
1682-
col: 19,
1760+
col: 20,
1761+
event: 'step_line',
1762+
heap:
1763+
{ '1':
1764+
[ 'JS_FUNCTION',
1765+
'bar',
1766+
'function bar(i) {\n var obj_lst = [i, {foo: i+1, poop: [1, 2, 3]}, {bar: i+2}];\n}',
1767+
null,
1768+
null ],
1769+
'2':
1770+
[ 'JS_FUNCTION',
1771+
'',
1772+
'function (i) {\n var local_x = 42;\n var local_y = "hello world";\n var local_z = true;\n var local_w = false;\n var local_q = null;\n console.log(\'foo:\', i*i);\n bar(i);\n return (local_x * local_x);\n}',
1773+
null,
1774+
null ] } },
1775+
{ stdout: 'foo: 0\nfoo: 1\nfoo: 4\n',
1776+
func_name: '',
1777+
stack_to_render: [],
1778+
globals:
1779+
{ global_x: 5,
1780+
global_y: 10,
1781+
foo: [ 'REF', 2 ],
1782+
bar: [ 'REF', 1 ],
1783+
i: 3 },
1784+
ordered_globals: [ 'global_x', 'global_y', 'foo', 'bar', 'i' ],
1785+
line: 19,
1786+
col: 15,
16831787
event: 'step_line',
16841788
heap:
16851789
{ '1':

‎v4-cokapi/backends/javascript/tests/caught-exception.golden‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
globals: { x: 5 },
1616
ordered_globals: [ 'x' ],
1717
line: 3,
18-
col: 12,
18+
col: 2,
1919
event: 'step_line',
2020
heap: {} },
2121
{ exception_msg: 'Error: oh crapo',
@@ -25,7 +25,7 @@
2525
globals: { x: 5 },
2626
ordered_globals: [ 'x' ],
2727
line: 3,
28-
col: 8,
28+
col: 2,
2929
event: 'exception',
3030
heap: {} },
3131
{ stdout: '',

‎v4-cokapi/backends/javascript/tests/closure0.golden‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
is_zombie: false,
2626
parent_frame_id_list: [],
2727
unique_hash: 'foo_f2',
28-
ordered_varnames: [ 'y', 'bar' ],
29-
encoded_locals: { y: 10, bar: [ 'REF', 2 ] } } ],
28+
ordered_varnames: [ 'bar', 'y' ],
29+
encoded_locals: { bar: [ 'REF', 2 ], y: 10 } } ],
3030
globals: { foo: [ 'REF', 1 ] },
3131
ordered_globals: [ 'foo' ],
3232
line: 5,
@@ -55,10 +55,10 @@
5555
is_zombie: false,
5656
parent_frame_id_list: [],
5757
unique_hash: 'foo_f2',
58-
ordered_varnames: [ 'y', 'bar', '__return__' ],
58+
ordered_varnames: [ 'bar', 'y', '__return__' ],
5959
encoded_locals:
60-
{ y: 30,
61-
bar: [ 'REF', 2 ],
60+
{ bar: [ 'REF', 2 ],
61+
y: 30,
6262
__return__: [ 'JS_SPECIAL_VAL', 'undefined' ] } } ],
6363
globals: { foo: [ 'REF', 1 ] },
6464
ordered_globals: [ 'foo' ],
@@ -103,8 +103,8 @@
103103
is_zombie: false,
104104
parent_frame_id_list: [],
105105
unique_hash: 'foo_f3',
106-
ordered_varnames: [ 'y', 'bar' ],
107-
encoded_locals: { y: 20, bar: [ 'REF', 3 ] } } ],
106+
ordered_varnames: [ 'bar', 'y' ],
107+
encoded_locals: { bar: [ 'REF', 3 ], y: 20 } } ],
108108
globals: { foo: [ 'REF', 1 ] },
109109
ordered_globals: [ 'foo' ],
110110
line: 5,
@@ -133,10 +133,10 @@
133133
is_zombie: false,
134134
parent_frame_id_list: [],
135135
unique_hash: 'foo_f3',
136-
ordered_varnames: [ 'y', 'bar', '__return__' ],
136+
ordered_varnames: [ 'bar', 'y', '__return__' ],
137137
encoded_locals:
138-
{ y: 60,
139-
bar: [ 'REF', 3 ],
138+
{ bar: [ 'REF', 3 ],
139+
y: 60,
140140
__return__: [ 'JS_SPECIAL_VAL', 'undefined' ] } } ],
141141
globals: { foo: [ 'REF', 1 ] },
142142
ordered_globals: [ 'foo' ],
@@ -181,8 +181,8 @@
181181
is_zombie: false,
182182
parent_frame_id_list: [],
183183
unique_hash: 'foo_f4',
184-
ordered_varnames: [ 'y', 'bar' ],
185-
encoded_locals: { y: 30, bar: [ 'REF', 4 ] } } ],
184+
ordered_varnames: [ 'bar', 'y' ],
185+
encoded_locals: { bar: [ 'REF', 4 ], y: 30 } } ],
186186
globals: { foo: [ 'REF', 1 ] },
187187
ordered_globals: [ 'foo' ],
188188
line: 5,
@@ -211,10 +211,10 @@
211211
is_zombie: false,
212212
parent_frame_id_list: [],
213213
unique_hash: 'foo_f4',
214-
ordered_varnames: [ 'y', 'bar', '__return__' ],
214+
ordered_varnames: [ 'bar', 'y', '__return__' ],
215215
encoded_locals:
216-
{ y: 90,
217-
bar: [ 'REF', 4 ],
216+
{ bar: [ 'REF', 4 ],
217+
y: 90,
218218
__return__: [ 'JS_SPECIAL_VAL', 'undefined' ] } } ],
219219
globals: { foo: [ 'REF', 1 ] },
220220
ordered_globals: [ 'foo' ],

‎v4-cokapi/backends/javascript/tests/closure1.golden‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
is_zombie: false,
4747
parent_frame_id_list: [],
4848
unique_hash: 'foo_f2',
49-
ordered_varnames: [ 'y', 'bar' ],
50-
encoded_locals: { y: 1, bar: [ 'REF', 2 ] } } ],
49+
ordered_varnames: [ 'bar', 'y' ],
50+
encoded_locals: { bar: [ 'REF', 2 ], y: 1 } } ],
5151
globals:
5252
{ globalZ: 10,
5353
foo: [ 'REF', 1 ],
@@ -79,8 +79,8 @@
7979
is_zombie: false,
8080
parent_frame_id_list: [],
8181
unique_hash: 'foo_f2',
82-
ordered_varnames: [ 'y', 'bar', '__return__' ],
83-
encoded_locals: { y: 1, bar: [ 'REF', 2 ], __return__: [ 'REF', 2 ] } } ],
82+
ordered_varnames: [ 'bar', 'y', '__return__' ],
83+
encoded_locals: { bar: [ 'REF', 2 ], y: 1, __return__: [ 'REF', 2 ] } } ],
8484
globals:
8585
{ globalZ: 10,
8686
foo: [ 'REF', 1 ],

0 commit comments

Comments
 (0)