blob: a2c9c3fc30bc85e2bb312b8e8aab3422f8450ff6 [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/
*/
function fn() {
return function f(a, b, c) { };
}
assertEq(testLenientAndStrict('var f = fn(); f.name = "g"; f.name',
returns("f"), raisesException(TypeError)),
true);
assertEq(testLenientAndStrict('var f = fn(); delete f.name',
returns(true), returns(true)),
true);
// arity is not a spec defined property of Function.
assertEq(testLenientAndStrict('var f = fn(); f.arity = 4; f.arity',
returns(4), returns(4)),
true);
// arity is not a spec defined property of Function.
assertEq(testLenientAndStrict('var f = fn(); delete f.arity',
returns(true), returns(true)),
true);
reportCompare(true, true);
var successfullyParsed = true;