michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: michael@0: /* michael@0: * In strict mode, the identifier bound by a 'catch' clause may not michael@0: * be 'eval' or 'arguments'. michael@0: */ michael@0: assertEq(testLenientAndStrict('try{}catch(eval){}', michael@0: parsesSuccessfully, michael@0: parseRaisesException(SyntaxError)), michael@0: true); michael@0: assertEq(testLenientAndStrict('try{}catch([eval]){}', michael@0: parsesSuccessfully, michael@0: parseRaisesException(SyntaxError)), michael@0: true); michael@0: assertEq(testLenientAndStrict('try{}catch({x:eval}){}', michael@0: parsesSuccessfully, michael@0: parseRaisesException(SyntaxError)), michael@0: true); michael@0: assertEq(testLenientAndStrict('try{}catch(arguments){}', michael@0: parsesSuccessfully, michael@0: parseRaisesException(SyntaxError)), michael@0: true); michael@0: assertEq(testLenientAndStrict('try{}catch([arguments]){}', michael@0: parsesSuccessfully, michael@0: parseRaisesException(SyntaxError)), michael@0: true); michael@0: assertEq(testLenientAndStrict('try{}catch({x:arguments}){}', michael@0: parsesSuccessfully, michael@0: parseRaisesException(SyntaxError)), michael@0: true); michael@0: michael@0: reportCompare(true, true);