Esempio n. 1
0
        public void VerifyValuesOfZeroFlag(int initialValue, bool expectedResult)
        {
            var model = new ProgrammingModel();
              model.GetRegister(RegisterName.Y).SetValue(initialValue);
              model.ZeroFlag = !expectedResult;

              var instruction = new Iny();
              instruction.Execute(model, null, 0);

              Assert.That(model.ZeroFlag, Is.EqualTo(expectedResult));
        }
Esempio n. 2
0
        public void IncrementsTheValueInRegisterY()
        {
            const int initialValue = 42;

              var model = new ProgrammingModel();
              model.GetRegister(RegisterName.Y).SetValue(initialValue);
              var instruction = new Iny();
              instruction.Execute(model, null, 0);
              Assert.That(model.GetRegister(RegisterName.Y).GetValue(),
                  Is.EqualTo(initialValue + 1));
        }