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


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

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

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

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

reportCompare(0, 0);