summaryrefslogtreecommitdiff
path: root/test/built-ins/TypedArrays/from/BigInt/source-value-is-symbol-throws.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/TypedArrays/from/BigInt/source-value-is-symbol-throws.js')
-rw-r--r--test/built-ins/TypedArrays/from/BigInt/source-value-is-symbol-throws.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/built-ins/TypedArrays/from/BigInt/source-value-is-symbol-throws.js b/test/built-ins/TypedArrays/from/BigInt/source-value-is-symbol-throws.js
new file mode 100644
index 000000000..cebc1b114
--- /dev/null
+++ b/test/built-ins/TypedArrays/from/BigInt/source-value-is-symbol-throws.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-%typedarray%.from
+description: >
+ Throws a TypeError if argument is a Symbol
+info: |
+ 9.4.5.9 IntegerIndexedElementSet ( O, index, value )
+
+ ...
+ 3. Let numValue be ? ToNumber(value).
+ ...
+includes: [testBigIntTypedArray.js]
+features: [BigInt, Symbol, TypedArray]
+---*/
+
+var s = Symbol("1");
+
+testWithBigIntTypedArrayConstructors(function(TA) {
+ assert.throws(TypeError, function() {
+ TA.from([s]);
+ });
+});