summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/toReversed/this-is-not-tuple.js
blob: 7df6300533498a01bd7e67cf077a090474c8de12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
var withReversed = Tuple.prototype.withReversed;

var thisVals = [[undefined, "undefined"],
                [null, "null"],
                [42, "42"],
                ["1", "1"],
                [true, "true"],
                [false, "false"],
                [Symbol("s"), "Symbol(\"s\")"],
                [[], "[]"],
                [{}, "{}"]];

for (pair of thisVals) {
    thisVal = pair[0];
    errorMsg = "this is: " + pair[1];
    assertThrowsInstanceOf(() => withReversed.call(thisVal),
                           TypeError, errorMsg);
}

reportCompare(0, 0);