summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/symbol/toString.js
blob: 764ea7aab4864ab6d5664d34523b4bdf2e0d77a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
// ToString(symbol) throws a TypeError.

var N = 10, obj, hits = 0;
for (var i = 0; i < N; i++) {
    try {
        obj = new String(Symbol());
    } catch (exc) {
        hits++;
    }
}
assertEq(hits, N);