AjTalk.Tests.Compiler.ParserTests.CompileBlockWithParameterWithASpace C# (CSharp) Method

CompileBlockWithParameterWithASpace() private method

private CompileBlockWithParameterWithASpace ( ) : void
return void
        public void CompileBlockWithParameterWithASpace()
        {
            Parser compiler = new Parser(" : a | a doSomething");
            Block block = compiler.CompileBlock();

            Assert.IsNotNull(block);
            Assert.AreEqual(0, block.NoGlobalNames);
            Assert.AreEqual(0, block.NoLocals);
            Assert.AreEqual(1, block.NoConstants);
            Assert.IsNotNull(block.ByteCodes);
            Assert.AreEqual(5, block.ByteCodes.Length);
            Assert.AreEqual(1, block.Arity);

            object constant = block.GetConstant(0);

            Assert.IsNotNull(constant);
            Assert.IsInstanceOfType(constant, typeof(string));
            Assert.AreEqual("doSomething", constant);
        }
ParserTests