Add basic Symbol constructor tests (#1069)

* add Symbol.length test

* add Symbol.name test

* add global.Symbol test
This commit is contained in:
Aleksey Shvayka 2017-06-23 04:11:26 +03:00 committed by Leo Balter
parent e3fa66550f
commit 0d2b3562e9
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,18 @@
// Copyright (C) 2017 Aleksey Shvayka. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-symbol-constructor
description: >
Properties of the Symbol Constructor
Besides the length property (whose value is 0)
includes: [propertyHelper.js]
---*/
assert.sameValue(Symbol.length, 0, "The value of `Symbol.length` is `0`");
verifyNotEnumerable(Symbol, "length");
verifyNotWritable(Symbol, "length");
verifyConfigurable(Symbol, "length");

View File

@ -0,0 +1,16 @@
// Copyright (C) 2017 Aleksey Shvayka. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-symbol-constructor
description: >
Symbol ( [ description ] )
includes: [propertyHelper.js]
---*/
assert.sameValue(Symbol.name, "Symbol", "The value of `Symbol.name` is `'Symbol'`");
verifyNotEnumerable(Symbol, "name");
verifyNotWritable(Symbol, "name");
verifyConfigurable(Symbol, "name");

View File

@ -0,0 +1,15 @@
// Copyright (C) 2017 Aleksey Shvayka. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-symbol-constructor
description: >
The Symbol constructor is the %Symbol% intrinsic object and the initial
value of the Symbol property of the global object.
includes: [propertyHelper.js]
---*/
verifyNotEnumerable(this, "Symbol");
verifyWritable(this, "Symbol");
verifyConfigurable(this, "Symbol");