AjScript.Tests.Interpreter.ParserTests.ParseInnerFunctions C# (CSharp) Метод

ParseInnerFunctions() приватный Метод

private ParseInnerFunctions ( ) : void
Результат void
        public void ParseInnerFunctions()
        {
            IExpression expression = this.ParseExpression("function add1(x) { function bar() {} return x+1; function foo() {}}");
            Assert.IsNotNull(expression);
            Assert.IsInstanceOfType(expression, typeof(FunctionExpression));

            FunctionExpression funexpr = (FunctionExpression)expression;

            Assert.IsInstanceOfType(funexpr.Body, typeof(CompositeCommand));
            Assert.AreEqual(1, funexpr.ParameterNames.Length);
            Assert.AreEqual("add1", funexpr.Name);
        }
ParserTests