public void CloneTest() { var exp = new UserFunction("f", new[] { new Number(5) }); var clone = exp.Clone(); Assert.Equal(exp, clone); }
public override JavaScriptObject Evaluate(Scope scope, JavaScriptObject thisObject) { UserFunction constructorFunction = (UserFunction)scope.GetFunction(this.functionName, this.Position); UserFunction newObject = constructorFunction.Clone(); this.CallFunction(scope, newObject, newObject); return(newObject); }