summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/from/mapfn-is-not-callable-typeerror.js
blob: 9643a8a9164905c07cfc860348481a6b23bdda55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
let vals = [[null, "null"],
            [{}, "{}"],
            ['string', "\'string\'"],
            [true, "true"],
            [42, "42"],
            [Symbol('1'), "Symbol(\'1\')"]];

for (p of vals) {
    let mapfn = p[0];
    assertThrowsInstanceOf(() => Tuple.from([], mapfn),
                           TypeError, 'Tuple.from([],' + p[1] + ' should throw');
}

reportCompare(0, 0);