Add option to list symbols in Object.getOwnPropertyNames() (#3507)

Also a little refactoring of Object.getOwnPropertyNames()

JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
This commit is contained in:
Peter Marki
2020-01-16 15:59:27 +01:00
committed by Robert Fancsik
parent 8b41bf306a
commit 51244b6d08
13 changed files with 184 additions and 129 deletions
+9
View File
@@ -156,3 +156,12 @@ try {
} catch (e) {
assert (e instanceof TypeError)
}
var asd = Symbol ("asd");
var foo = Symbol ("foo");
var bar = Symbol ("bar");
var obj = {1: 5, "a": 6, [foo]: 7, [asd]: 8, [bar]: 9};
var result = Object.assign ({}, obj);
assert (result[foo] == 7);
assert (result[asd] == 8);
assert (result[bar] == 9);