11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci// Testing api calls for symbol 61cb0ef41Sopenharmony_ciconst test_symbol = require(`./build/${common.buildType}/test_symbol`); 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciconst fooSym = test_symbol.New('foo'); 91cb0ef41Sopenharmony_ciassert.strictEqual(fooSym.toString(), 'Symbol(foo)'); 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ciconst myObj = {}; 121cb0ef41Sopenharmony_cimyObj.foo = 'bar'; 131cb0ef41Sopenharmony_cimyObj[fooSym] = 'baz'; 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciassert.deepStrictEqual(Object.keys(myObj), ['foo']); 161cb0ef41Sopenharmony_ciassert.deepStrictEqual(Object.getOwnPropertyNames(myObj), ['foo']); 171cb0ef41Sopenharmony_ciassert.deepStrictEqual(Object.getOwnPropertySymbols(myObj), [fooSym]); 18