AjTalk.Tests.Compiler.VmCompilerTests.ExecuteTrueIfTrueIfFalse C# (CSharp) Méthode

ExecuteTrueIfTrueIfFalse() private méthode

private ExecuteTrueIfTrueIfFalse ( ) : void
Résultat void
        public void ExecuteTrueIfTrueIfFalse()
        {
            Machine machine = new Machine();

            Block block = this.compiler.CompileBlock("true ifTrue: [GlobalName := 'bar'] ifFalse: [GlobalName := 'foo']");

            Assert.IsNotNull(block);

            block.Execute(machine, null);

            Assert.AreEqual("bar", machine.GetGlobalObject("GlobalName"));
        }