diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2015-03-16 15:17:50 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2015-04-07 16:53:18 -0400 |
commit | 59e2a7ac57535fffcfe73f9ec919fc3f364c832b (patch) | |
tree | 91c5cbf908b6403e113e05c6daa682b3296b5c13 /test/built-ins/Set | |
parent | 2df6c4f219ecf883772ce02582f06112a07f18da (diff) | |
download | qtdeclarative-testsuites-59e2a7ac57535fffcfe73f9ec919fc3f364c832b.tar.gz |
Import tests from Google V8 (Symbol)
These tests are derived from the following files within the Google V8 project:
test/mjsunit/harmony/private.js
Diffstat (limited to 'test/built-ins/Set')
-rw-r--r-- | test/built-ins/Set/symbol-as-entry.js | 17 | ||||
-rw-r--r-- | test/built-ins/Set/symbol-species.js | 18 |
2 files changed, 35 insertions, 0 deletions
diff --git a/test/built-ins/Set/symbol-as-entry.js b/test/built-ins/Set/symbol-as-entry.js new file mode 100644 index 000000000..7faa66703 --- /dev/null +++ b/test/built-ins/Set/symbol-as-entry.js @@ -0,0 +1,17 @@ +// Copyright (C) Copyright 2013 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 19.4 +description: > + Symbol as Set entry +features: [Set] +---*/ +var set = new Set(); +var sym = Symbol(); + +set.add(sym); + +assert.sameValue(set.size, 1, "The value of `set.size` is `1`, after executing `set.add(sym)`"); +assert.sameValue(set.has(sym), true, "`set.has(sym)` returns `true`"); +assert.sameValue(set.delete(sym), true, "`set.delete(sym)` returns `true`"); +assert.sameValue(set.size, 0, "The value of `set.size` is `0`"); diff --git a/test/built-ins/Set/symbol-species.js b/test/built-ins/Set/symbol-species.js new file mode 100644 index 000000000..6f9763199 --- /dev/null +++ b/test/built-ins/Set/symbol-species.js @@ -0,0 +1,18 @@ +// Copyright 2015 Cubane Canada, Inc. All rights reserved. +// See LICENSE for details. + +/*--- +info: > + Set has a property at `Symbol.species` +es6id: 23.2.2.2 +author: Sam Mikes +description: Set[Symbol.species] exists per spec +includes: + - propertyHelper.js +---*/ + +assert.sameValue(Set[Symbol.species], Set, "Set[Symbol.species] is Set"); + +verifyNotWritable(Set, Symbol.species, Symbol.species); +verifyNotEnumerable(Set, Symbol.species); +verifyConfigurable(Set, Symbol.species); |