summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/xml-in-strict.js
blob: 0e2ddf89b5c8ac6eaa5b6918e819c24d9fa5b389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

function checkSyntaxError(code) {
    var error;
    try {
        eval(code);
    } catch (e) {
        error = e;
    }
    assertEq(error.name, 'SyntaxError');
}

checkSyntaxError('"use strict"; *');
checkSyntaxError('"use strict"; @7');