Remove ES_NEXT macro (#4915)

- remove all '#JERRY_ESNEXT' macro
- remove 5.1 build profile, update test runner accordingly (Note: all builtins are turn on by default)
- move tests from tests/jerry/esnext into tests/jerry, concatenate files with same names
- add skiplist to some snapshot tests that were supported only in 5.1
- fix doxygen issues that were hidden before (bc. of es.next macro)

Co-authored-by: Martin Negyokru negyokru@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2022-01-31 16:46:00 +01:00
committed by GitHub
parent 76403606d0
commit 4924f9fd31
973 changed files with 1902 additions and 8240 deletions
+55
View File
@@ -137,3 +137,58 @@ assert(bound.length === 1);
bound = foo.bind(null, 9, 8);
assert(bound.length === 0);
/* extended class */
(function() {
class C extends Function {}
var c = new C("x", "y", "return this.foo + x + y;").bind({foo : 1}, 2);
assert(c(3) === 6);
assert(c instanceof C);
})();
function boundPrototypeChecker(f, proto) {
Object.setPrototypeOf(f, proto);
var boundFunc = Function.prototype.bind.call(f, null);
assert(Object.getPrototypeOf(boundFunc) === proto);
}
/* generator function */
(function() {
var f = function*(){};
boundPrototypeChecker(f, Function.prototype)
boundPrototypeChecker(f, {})
boundPrototypeChecker(f, null);
})();
/* arrow function */
(function() {
var f = () => 5;
boundPrototypeChecker(f, Function.prototype)
boundPrototypeChecker(f, {})
boundPrototypeChecker(f, null);
})();
/* simple class */
(function() {
class C {};
boundPrototypeChecker(C, Function.prototype)
boundPrototypeChecker(C, {})
boundPrototypeChecker(C, null);
})();
/* subclasses */
(function() {
function boundPrototypeChecker(superclass) {
class C extends superclass {
constructor() {
return Object.create(null);
}
}
var boundF = Function.prototype.bind.call(C, null);
assert(Object.getPrototypeOf(boundF) === Object.getPrototypeOf(C));
}
boundPrototypeChecker(function(){});
boundPrototypeChecker(Array);
boundPrototypeChecker(null);
})();