1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
4 * Any copyright is dedicated to the Public Domain.
5 * http://creativecommons.org/licenses/publicdomain/
8 assertEq(testLenientAndStrict('var r = /foo/; r.source = "bar"; r.source',
9 returns("foo"), raisesException(TypeError)),
11 assertEq(testLenientAndStrict('var r = /foo/; delete r.source',
12 returns(false), raisesException(TypeError)),
15 assertEq(testLenientAndStrict('var r = /foo/; r.global = true; r.global',
16 returns(false), raisesException(TypeError)),
18 assertEq(testLenientAndStrict('var r = /foo/; delete r.global',
19 returns(false), raisesException(TypeError)),
22 assertEq(testLenientAndStrict('var r = /foo/; r.ignoreCase = true; r.ignoreCase',
23 returns(false), raisesException(TypeError)),
25 assertEq(testLenientAndStrict('var r = /foo/; delete r.ignoreCase',
26 returns(false), raisesException(TypeError)),
29 assertEq(testLenientAndStrict('var r = /foo/; r.multiline = true; r.multiline',
30 returns(false), raisesException(TypeError)),
32 assertEq(testLenientAndStrict('var r = /foo/; delete r.multiline',
33 returns(false), raisesException(TypeError)),
36 assertEq(testLenientAndStrict('var r = /foo/; r.lastIndex = 42; r.lastIndex',
37 returns(42), returns(42)),
39 assertEq(testLenientAndStrict('var r = /foo/; delete r.lastIndex',
40 returns(false), raisesException(TypeError)),
43 reportCompare(true, true);
45 var successfullyParsed = true;