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
+51
View File
@@ -219,3 +219,54 @@ assert (JSON.stringify ({"key1": false, "key2": 12}, ["key1"], "abc") === '{\nab
assert (JSON.stringify ({"key1": false, "key2": 12}, ["key2"], "abc") === '{\nabc"key2": 12\n}');
assert (JSON.stringify ({"key1": false, "key2": 12}, ["key1", "key2"], "abc") === '{\nabc"key1": false,\nabc"key2": 12\n}');
assert (JSON.stringify ({"key1": false, "key2": 12}, ["key", "key3"], "abc") === '{}');
// Test with proxy
assert(JSON.stringify(new Proxy(['foo'], {})) === '["foo"]');
assert(JSON.stringify(new Proxy({0:"foo"}, {})) === '{"0":"foo"}');
var target = [1,2,3];
var handler = {
get(target, prop) {
if (prop == "length")
{
throw 42;
}
}
}
try {
JSON.stringify(new Proxy(target,handler));
assert(false);
} catch (e) {
assert(e === 42);
}
var revocable = Proxy.revocable (target, { get (t, p , r) {
if (p == "toJSON") {
revocable.revoke();
}
}});
var proxy = revocable.proxy;
try {
JSON.stringify(proxy);
assert(false);
} catch (e) {
assert(e instanceof TypeError);
}
// Checking quoting strings
assert(JSON.stringify("ab𬄕c") === '"ab𬄕\\u001fc"');
assert(JSON.stringify("ab\uDC01cd") === '"ab\\udc01c\\u001fd"');
assert(JSON.stringify("ab\uDC01cd\uD8331e") === '"ab\\udc01c\\u001fd\\ud8331e"');
// Test case where the proxy is already revoked
var handle = Proxy.revocable([], {});
handle.revoke();
try {
JSON.stringify(handle.proxy);
assert(false);
} catch (ex) {
assert(ex instanceof TypeError);
}