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


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

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

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

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

reportCompare(0, 0);