Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / TypedArray / prototype / join / invoked-as-method.js
blobd57a9cd0b36d08bc8330311e7bd1cede3fb7eefa
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-%typedarray%.prototype.join
5 description: Requires a [[TypedArrayName]] internal slot.
6 info: |
7   22.2.3.14 %TypedArray%.prototype.join ( separator )
9   This function is not generic. ValidateTypedArray is applied to the this value
10   prior to evaluating the algorithm. If its result is an abrupt completion that
11   exception is thrown instead of evaluating the algorithm.
13   22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
15   1. If Type(O) is not Object, throw a TypeError exception.
16   2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
17   exception.
18   ...
19 includes: [testTypedArray.js]
20 features: [TypedArray]
21 ---*/
23 var TypedArrayPrototype = TypedArray.prototype;
25 assert.sameValue(typeof TypedArrayPrototype.join, 'function');
27 assert.throws(TypeError, function() {
28   TypedArrayPrototype.join();
29 });
31 reportCompare(0, 0);