Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public void TestValues()
        {
            VirtualMachine vm = new VirtualMachine();

            List <byte> actual = new DefArrayInstruction()
                                 .Type(_type)
                                 .Id(_id)
                                 .Length(_length)
                                 .ToInstructions();

            TestHelper.AssertResultsEqual(_expected, actual);
        }
Esempio n. 3
0
        public void TestNoTypeIdOrLength()
        {
            VirtualMachine vm = new VirtualMachine();

            _expected = new List <byte>()
            {
                (byte)InstructionsEnum.DefArray
            };

            List <byte> actual = new DefArrayInstruction()
                                 .ToInstructions();

            TestHelper.AssertResultsEqual(_expected, actual);
        }