blob: f0fff9693eb7d0f36381c4bb28db4f930504d43a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
/* Ensure that slice uses internal length and not length property */
var getCalls = 0;
var desc = {
get: function getLen() {
getCalls++;
return 0;
}
};
Object.defineProperty(Tuple.prototype, "length", desc);
var sample = Object(#[42, 43]);
var result = sample.slice();
assertEq(getCalls, 0, "ignores length properties");
assertEq(result, #[42, 43]);
reportCompare(0, 0);
|