Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / TypedArray / prototype / join / empty-instance-empty-string.js
blob54e40f5194c9b71cb012396ff39c2d6cd969d43e
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: Return the empty String if length is 0
6 info: |
7   22.2.3.15 %TypedArray%.prototype.join ( separator )
9   %TypedArray%.prototype.join is a distinct function that implements the same
10   algorithm as Array.prototype.join as defined in 22.1.3.13 except that the this
11   object's [[ArrayLength]] internal slot is accessed in place of performing a
12   [[Get]] of "length".
14   22.1.3.13 Array.prototype.join (separator)
16   ...
17   4. Let sep be ? ToString(separator).
18   5. If len is zero, return the empty String.
19   ...
20 includes: [testTypedArray.js]
21 features: [TypedArray]
22 ---*/
24 testWithTypedArrayConstructors(function(TA) {
25   var sample = new TA();
27   assert.sameValue(sample.join(), "");
28   assert.sameValue(sample.join("test262"), "");
29 });
31 reportCompare(0, 0);