using System; using System.Collections.Generic; using System.Text; using UnitTestSharp; using Sunweaver.Commands.Abstracts; using Sunweaver.Commands.UnaryLogic; using Sunweaver.DataPrototypes; namespace Sunweaver.UnitTests.Commands.UnaryLogic { public class notTests : TestFixture { BasePair bp = new not(); VirtualMachine VM; Codule codule; public override void TestSetup() { VM = new VirtualMachine(); codule = new Codule(); codule.BasePairs.Add(bp); } public void Correct() { VM.BoolStack.Push(false); bp.Implementation(VM); CheckTrue( VM.BoolStack.Pop()); } public void Compiled() { VM.BoolStack.Push(false); codule.Compile(); codule.Execute(VM); CheckTrue(VM.BoolStack.Pop()); } public void NameTest() { CheckEqual("not", bp.ToString()); } } }