summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/map/length.js
blob: 02d77af7ed16b3bca27e368a97a094e392c49e6e (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.map, "length");
assertEq(desc.value, 1);
assertEq(desc.writable, false);
assertEq(desc.enumerable, false);
assertEq(desc.configurable, true);


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

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

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

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

reportCompare(0, 0);