summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/toString/length.js
blob: 1a12340df3fcdb4bf30b39c2ce5346e79e0f0ba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
var desc = Object.getOwnPropertyDescriptor(Tuple.prototype.toString, "length");
assertEq(desc.value, 0);
assertEq(desc.writable, false);
assertEq(desc.enumerable, false);
assertEq(desc.configurable, true);


desc = Object.getOwnPropertyDescriptor(Tuple.prototype.toString, "name");
assertEq(desc.value, "toString");
assertEq(desc.writable, false);
assertEq(desc.enumerable, false);
assertEq(desc.configurable, true);

desc = Object.getOwnPropertyDescriptor(Tuple.prototype, "toString");
assertEq(desc.writable, true);
assertEq(desc.enumerable, false);
assertEq(desc.configurable, true);

assertEq(isConstructor(Tuple.prototype.toString), false);

assertThrowsInstanceOf(() => {
  let t = #[1];
  new t.toString();
}, TypeError, '`let t = #[1]; new t.toString()` throws TypeError');

reportCompare(0, 0);