blob: 882442738fa56137525592b819c9ac0cd922be2a [file] [log] [blame]
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/licenses/publicdomain/
*/
assertEq(testLenientAndStrict('var r = /foo/; r.source = "bar"; r.source',
returns("foo"), raisesException(TypeError)),
true);
assertEq(testLenientAndStrict('var r = /foo/; delete r.source',
returns(true), returns(true)),
true);
assertEq(testLenientAndStrict('var r = /foo/; r.global = true; r.global',
returns(false), raisesException(TypeError)),
true);
assertEq(testLenientAndStrict('var r = /foo/; delete r.global',
returns(true), returns(true)),
true);
assertEq(testLenientAndStrict('var r = /foo/; r.ignoreCase = true; r.ignoreCase',
returns(false), raisesException(TypeError)),
true);
assertEq(testLenientAndStrict('var r = /foo/; delete r.ignoreCase',
returns(true), returns(true)),
true);
assertEq(testLenientAndStrict('var r = /foo/; r.multiline = true; r.multiline',
returns(false), raisesException(TypeError)),
true);
assertEq(testLenientAndStrict('var r = /foo/; delete r.multiline',
returns(true), returns(true)),
true);
assertEq(testLenientAndStrict('var r = /foo/; r.lastIndex = 42; r.lastIndex',
returns(42), returns(42)),
true);
assertEq(testLenientAndStrict('var r = /foo/; delete r.lastIndex',
returns(false), raisesException(TypeError)),
true);
reportCompare(true, true);
var successfullyParsed = true;