js-on-sx: baseline commit (278/280 unit, 148/148 slice, runner stub)
Initial commit of the lib/js/ tree and plans/ directory. A previous session left template-string work in progress — 278/280 unit tests pass (2 failing: tpl part-count off-by-one, escaped-backtick ident lookup). test262-runner.py and scoreboard are placeholders (0/8 with 7 timeouts); fixing the runner is the next queue item.
This commit is contained in:
1
lib/js/test262-slice/errors/error_message.expected
Normal file
1
lib/js/test262-slice/errors/error_message.expected
Normal file
@@ -0,0 +1 @@
|
||||
oops
|
||||
3
lib/js/test262-slice/errors/error_message.js
Normal file
3
lib/js/test262-slice/errors/error_message.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var m;
|
||||
try { throw new Error("oops"); } catch(e) { m = e.message; }
|
||||
m
|
||||
1
lib/js/test262-slice/errors/throw_catch_string.expected
Normal file
1
lib/js/test262-slice/errors/throw_catch_string.expected
Normal file
@@ -0,0 +1 @@
|
||||
boom
|
||||
3
lib/js/test262-slice/errors/throw_catch_string.js
Normal file
3
lib/js/test262-slice/errors/throw_catch_string.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var msg;
|
||||
try { throw "boom"; } catch(e) { msg = e; }
|
||||
msg
|
||||
1
lib/js/test262-slice/errors/throw_in_function.expected
Normal file
1
lib/js/test262-slice/errors/throw_in_function.expected
Normal file
@@ -0,0 +1 @@
|
||||
div by zero
|
||||
7
lib/js/test262-slice/errors/throw_in_function.js
Normal file
7
lib/js/test262-slice/errors/throw_in_function.js
Normal file
@@ -0,0 +1,7 @@
|
||||
function divide(a, b) {
|
||||
if (b === 0) throw new Error("div by zero");
|
||||
return a / b;
|
||||
}
|
||||
var result;
|
||||
try { result = divide(10, 0); } catch(e) { result = e.message; }
|
||||
result
|
||||
1
lib/js/test262-slice/errors/try_finally.expected
Normal file
1
lib/js/test262-slice/errors/try_finally.expected
Normal file
@@ -0,0 +1 @@
|
||||
3
|
||||
3
lib/js/test262-slice/errors/try_finally.js
Normal file
3
lib/js/test262-slice/errors/try_finally.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var x = 0;
|
||||
try { x = 1; throw "e"; } catch(e) { x = 2; } finally { x = 3; }
|
||||
x
|
||||
1
lib/js/test262-slice/errors/typeerror_name.expected
Normal file
1
lib/js/test262-slice/errors/typeerror_name.expected
Normal file
@@ -0,0 +1 @@
|
||||
TypeError
|
||||
3
lib/js/test262-slice/errors/typeerror_name.js
Normal file
3
lib/js/test262-slice/errors/typeerror_name.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var n;
|
||||
try { throw new TypeError("bad type"); } catch(e) { n = e.name; }
|
||||
n
|
||||
Reference in New Issue
Block a user