AjScript.Tests.Interpreter.ParserTests.ParseEmptyFunction C# (CSharp) Method

ParseEmptyFunction() private method

private ParseEmptyFunction ( ) : void
return void
        public void ParseEmptyFunction()
        {
            IExpression expression = this.ParseExpression("function() {}");
            Assert.IsNotNull(expression);
            Assert.IsInstanceOfType(expression, typeof(FunctionExpression));

            FunctionExpression funexpr = (FunctionExpression)expression;

            Assert.IsInstanceOfType(funexpr.Body, typeof(CompositeCommand));
            Assert.AreEqual(0, funexpr.ParameterNames.Length);
            Assert.IsNull(funexpr.Name);
        }
ParserTests