public void TestExpressions() { VirtualMachine vm = new VirtualMachine(); List <byte> actual = new DefArrayInstruction() .Type(new LiteralInstruction(_type)) .Id(new LiteralInstruction(_id)) .Length(new LiteralInstruction(_length)) .ToInstructions(); TestHelper.AssertResultsEqual(_expected, actual); }
public void TestValues() { VirtualMachine vm = new VirtualMachine(); List <byte> actual = new DefArrayInstruction() .Type(_type) .Id(_id) .Length(_length) .ToInstructions(); TestHelper.AssertResultsEqual(_expected, actual); }
public void TestNoTypeIdOrLength() { VirtualMachine vm = new VirtualMachine(); _expected = new List <byte>() { (byte)InstructionsEnum.DefArray }; List <byte> actual = new DefArrayInstruction() .ToInstructions(); TestHelper.AssertResultsEqual(_expected, actual); }