diff options
author | Mike Pennisi <mike@mikepennisi.com> | 2015-08-07 18:40:04 -0400 |
---|---|---|
committer | Mike Pennisi <mike@mikepennisi.com> | 2015-08-07 20:02:44 -0400 |
commit | d6bbbc9aed41c430d4d79f2f3c018a02665fb1d4 (patch) | |
tree | 775a75e53c851cb02c1c9067ddba21bec0d3ad15 /test/built-ins/WeakMap | |
parent | 9cb89a4e3c64e27ae385f3a65c26f69467f49314 (diff) | |
download | qtdeclarative-testsuites-d6bbbc9aed41c430d4d79f2f3c018a02665fb1d4.tar.gz |
Add tests for well-known Symbol: @@toStringTag
Diffstat (limited to 'test/built-ins/WeakMap')
-rw-r--r-- | test/built-ins/WeakMap/prototype/Symbol.toStringTag.js | 21 | ||||
-rw-r--r-- | test/built-ins/WeakMap/prototype/Symbol.toStringTag/property-descriptor.js | 26 |
2 files changed, 21 insertions, 26 deletions
diff --git a/test/built-ins/WeakMap/prototype/Symbol.toStringTag.js b/test/built-ins/WeakMap/prototype/Symbol.toStringTag.js new file mode 100644 index 000000000..a5fb0227b --- /dev/null +++ b/test/built-ins/WeakMap/prototype/Symbol.toStringTag.js @@ -0,0 +1,21 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 23.3.3.6 +description: > + `Symbol.toStringTag` property descriptor +info: > + The initial value of the @@toStringTag property is the String value + "WeakMap". + + This property has the attributes { [[Writable]]: false, [[Enumerable]]: + false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [Symbol.toStringTag] +---*/ + +assert.sameValue(WeakMap.prototype[Symbol.toStringTag], 'WeakMap'); + +verifyNotEnumerable(WeakMap.prototype, Symbol.toStringTag); +verifyNotWritable(WeakMap.prototype, Symbol.toStringTag); +verifyConfigurable(WeakMap.prototype, Symbol.toStringTag); diff --git a/test/built-ins/WeakMap/prototype/Symbol.toStringTag/property-descriptor.js b/test/built-ins/WeakMap/prototype/Symbol.toStringTag/property-descriptor.js deleted file mode 100644 index ef26cc6af..000000000 --- a/test/built-ins/WeakMap/prototype/Symbol.toStringTag/property-descriptor.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2015 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 23.3.3.6 -description: "WeakMap#@@toStringTag value and writability" -info: > - WeakMap.prototype [ @@toStringTag ] - - The initial value of the @@toStringTag property is the String value "WeakMap". - - This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, - [[Configurable]]: true }. -includes: [propertyHelper.js] - ---*/ - -var WeakMapProto = WeakMap.prototype; - -assert.sameValue( - WeakMapProto[Symbol.toStringTag], - 'WeakMap', - 'The value of WeakMap.prototype[Symbol.toStringTag] is "WeakMap"' -); - -verifyNotEnumerable(WeakMapProto, Symbol.toStringTag); -verifyNotWritable(WeakMapProto, Symbol.toStringTag); -verifyConfigurable(WeakMapProto, Symbol.toStringTag); |