AjTalk.Tests.Compiler.VmCompilerTests.CompileBlockWithParameter C# (CSharp) Method

CompileBlockWithParameter() private method

private CompileBlockWithParameter ( ) : void
return void
        public void CompileBlockWithParameter()
        {
            Block block = this.compiler.CompileBlock(" :a | a doSomething");

            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);
        }