Example #1
0
        public void Should_store_Inc_result(short value, short expected)
        {
            Mockery
            .VariableRetrieves(value);

            var args = new OperandBuilder()
                       .WithArg(AnyVariable)
                       .Build();

            Operation.Execute(args);

            Mockery
            .ResultStored(expected);
        }
Example #2
0
        public void Should_store_Dec_result(ushort value, ushort expected)
        {
            Mockery
            .VariableRetrieves(value);

            var args = new OperandBuilder()
                       .WithArg(value)
                       .Build();

            Operation.Execute(args);

            Mockery
            .ResultDestinationRetrievedFromPC()
            .ResultStored(expected);
        }
Example #3
0
        public void Should_retrieve_variable_and_store()
        {
            const ushort value = 1234;

            Mockery
            .VariableRetrieves(value);

            var args = new OperandBuilder()
                       .WithArg(AnyVariable)
                       .Build();

            Operation.Execute(args);

            Mockery
            .ResultDestinationRetrievedFromPC()
            .ResultStored(value);
        }
Example #4
0
        public void Should_increment_value_and_NOT_jump()
        {
            ushort initialValue = 10;
            ushort comparison   = 15;
            var    args         = new OperandBuilder()
                                  .WithArg(AnyValue)
                                  .WithArg(comparison)
                                  .Build();

            Mockery.VariableRetrieves(initialValue);

            Operation.Execute(args);

            var expectedValue = (initialValue + 1);

            Mockery
            .ResultStored((ushort)expectedValue)
            .JumpedWith(false);
        }