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/functions/arrow_add.expected
Normal file
1
lib/js/test262-slice/functions/arrow_add.expected
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
lib/js/test262-slice/functions/arrow_add.js
Normal file
1
lib/js/test262-slice/functions/arrow_add.js
Normal file
@@ -0,0 +1 @@
|
||||
(x => x + 1)(41)
|
||||
1
lib/js/test262-slice/functions/arrow_block.expected
Normal file
1
lib/js/test262-slice/functions/arrow_block.expected
Normal file
@@ -0,0 +1 @@
|
||||
22
|
||||
1
lib/js/test262-slice/functions/arrow_block.js
Normal file
1
lib/js/test262-slice/functions/arrow_block.js
Normal file
@@ -0,0 +1 @@
|
||||
let f = x => { let y = x + 1; return y * 2; }; f(10)
|
||||
1
lib/js/test262-slice/functions/arrow_curry.expected
Normal file
1
lib/js/test262-slice/functions/arrow_curry.expected
Normal file
@@ -0,0 +1 @@
|
||||
7
|
||||
1
lib/js/test262-slice/functions/arrow_curry.js
Normal file
1
lib/js/test262-slice/functions/arrow_curry.js
Normal file
@@ -0,0 +1 @@
|
||||
(x => y => x + y)(3)(4)
|
||||
1
lib/js/test262-slice/functions/arrow_identity.expected
Normal file
1
lib/js/test262-slice/functions/arrow_identity.expected
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
lib/js/test262-slice/functions/arrow_identity.js
Normal file
1
lib/js/test262-slice/functions/arrow_identity.js
Normal file
@@ -0,0 +1 @@
|
||||
(x => x)(42)
|
||||
1
lib/js/test262-slice/functions/arrow_multi_arg.expected
Normal file
1
lib/js/test262-slice/functions/arrow_multi_arg.expected
Normal file
@@ -0,0 +1 @@
|
||||
7
|
||||
1
lib/js/test262-slice/functions/arrow_multi_arg.js
Normal file
1
lib/js/test262-slice/functions/arrow_multi_arg.js
Normal file
@@ -0,0 +1 @@
|
||||
((a,b) => a + b)(3,4)
|
||||
1
lib/js/test262-slice/functions/arrow_zero.expected
Normal file
1
lib/js/test262-slice/functions/arrow_zero.expected
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
lib/js/test262-slice/functions/arrow_zero.js
Normal file
1
lib/js/test262-slice/functions/arrow_zero.js
Normal file
@@ -0,0 +1 @@
|
||||
(() => 42)()
|
||||
1
lib/js/test262-slice/functions/closure_ref.expected
Normal file
1
lib/js/test262-slice/functions/closure_ref.expected
Normal file
@@ -0,0 +1 @@
|
||||
21
|
||||
1
lib/js/test262-slice/functions/closure_ref.js
Normal file
1
lib/js/test262-slice/functions/closure_ref.js
Normal file
@@ -0,0 +1 @@
|
||||
function compose(f, g) { return x => f(g(x)); } let addOne = x => x + 1; let double = x => x * 2; compose(addOne, double)(10)
|
||||
1
lib/js/test262-slice/functions/default_param.expected
Normal file
1
lib/js/test262-slice/functions/default_param.expected
Normal file
@@ -0,0 +1 @@
|
||||
25
|
||||
1
lib/js/test262-slice/functions/default_param.js
Normal file
1
lib/js/test262-slice/functions/default_param.js
Normal file
@@ -0,0 +1 @@
|
||||
function f(x = 10, y = 20) { return x + y; } f(5)
|
||||
1
lib/js/test262-slice/functions/func_decl.expected
Normal file
1
lib/js/test262-slice/functions/func_decl.expected
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
lib/js/test262-slice/functions/func_decl.js
Normal file
1
lib/js/test262-slice/functions/func_decl.js
Normal file
@@ -0,0 +1 @@
|
||||
function add(a, b) { return a + b; } add(17, 25)
|
||||
1
lib/js/test262-slice/functions/higher_order.expected
Normal file
1
lib/js/test262-slice/functions/higher_order.expected
Normal file
@@ -0,0 +1 @@
|
||||
81
|
||||
1
lib/js/test262-slice/functions/higher_order.js
Normal file
1
lib/js/test262-slice/functions/higher_order.js
Normal file
@@ -0,0 +1 @@
|
||||
function twice(f, x) { return f(f(x)); } twice(n => n * n, 3)
|
||||
1
lib/js/test262-slice/functions/iife.expected
Normal file
1
lib/js/test262-slice/functions/iife.expected
Normal file
@@ -0,0 +1 @@
|
||||
81
|
||||
1
lib/js/test262-slice/functions/iife.js
Normal file
1
lib/js/test262-slice/functions/iife.js
Normal file
@@ -0,0 +1 @@
|
||||
(function(x) { return x * x; })(9)
|
||||
1
lib/js/test262-slice/functions/math_abs.expected
Normal file
1
lib/js/test262-slice/functions/math_abs.expected
Normal file
@@ -0,0 +1 @@
|
||||
5
|
||||
1
lib/js/test262-slice/functions/math_abs.js
Normal file
1
lib/js/test262-slice/functions/math_abs.js
Normal file
@@ -0,0 +1 @@
|
||||
Math.abs(-5)
|
||||
1
lib/js/test262-slice/functions/math_ceil.expected
Normal file
1
lib/js/test262-slice/functions/math_ceil.expected
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
1
lib/js/test262-slice/functions/math_ceil.js
Normal file
1
lib/js/test262-slice/functions/math_ceil.js
Normal file
@@ -0,0 +1 @@
|
||||
Math.ceil(3.1)
|
||||
1
lib/js/test262-slice/functions/math_floor.expected
Normal file
1
lib/js/test262-slice/functions/math_floor.expected
Normal file
@@ -0,0 +1 @@
|
||||
3
|
||||
1
lib/js/test262-slice/functions/math_floor.js
Normal file
1
lib/js/test262-slice/functions/math_floor.js
Normal file
@@ -0,0 +1 @@
|
||||
Math.floor(3.9)
|
||||
1
lib/js/test262-slice/functions/math_max.expected
Normal file
1
lib/js/test262-slice/functions/math_max.expected
Normal file
@@ -0,0 +1 @@
|
||||
5
|
||||
1
lib/js/test262-slice/functions/math_max.js
Normal file
1
lib/js/test262-slice/functions/math_max.js
Normal file
@@ -0,0 +1 @@
|
||||
Math.max(1,5,3)
|
||||
1
lib/js/test262-slice/functions/math_min.expected
Normal file
1
lib/js/test262-slice/functions/math_min.expected
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
lib/js/test262-slice/functions/math_min.js
Normal file
1
lib/js/test262-slice/functions/math_min.js
Normal file
@@ -0,0 +1 @@
|
||||
Math.min(1,5,3)
|
||||
1
lib/js/test262-slice/functions/math_pi_gt_3.expected
Normal file
1
lib/js/test262-slice/functions/math_pi_gt_3.expected
Normal file
@@ -0,0 +1 @@
|
||||
true
|
||||
1
lib/js/test262-slice/functions/math_pi_gt_3.js
Normal file
1
lib/js/test262-slice/functions/math_pi_gt_3.js
Normal file
@@ -0,0 +1 @@
|
||||
Math.PI > 3
|
||||
1
lib/js/test262-slice/functions/recursion_fact.expected
Normal file
1
lib/js/test262-slice/functions/recursion_fact.expected
Normal file
@@ -0,0 +1 @@
|
||||
720
|
||||
1
lib/js/test262-slice/functions/recursion_fact.js
Normal file
1
lib/js/test262-slice/functions/recursion_fact.js
Normal file
@@ -0,0 +1 @@
|
||||
function fact(n) { if (n <= 1) return 1; return n * fact(n - 1); } fact(6)
|
||||
1
lib/js/test262-slice/functions/recursion_fib.expected
Normal file
1
lib/js/test262-slice/functions/recursion_fib.expected
Normal file
@@ -0,0 +1 @@
|
||||
144
|
||||
1
lib/js/test262-slice/functions/recursion_fib.js
Normal file
1
lib/js/test262-slice/functions/recursion_fib.js
Normal file
@@ -0,0 +1 @@
|
||||
function fib(n) { if (n < 2) return n; return fib(n-1) + fib(n-2); } fib(12)
|
||||
1
lib/js/test262-slice/functions/rest_param.expected
Normal file
1
lib/js/test262-slice/functions/rest_param.expected
Normal file
@@ -0,0 +1 @@
|
||||
21
|
||||
1
lib/js/test262-slice/functions/rest_param.js
Normal file
1
lib/js/test262-slice/functions/rest_param.js
Normal file
@@ -0,0 +1 @@
|
||||
function sum(...xs) { let t = 0; for (let i = 0; i < xs.length; i = i + 1) t = t + xs[i]; return t; } sum(1,2,3,4,5,6)
|
||||
Reference in New Issue
Block a user