gameboy superoptimizer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
326 B

  1. from tests.insn.helpers import *
  2. def test_ccf():
  3. cpu = CPU()
  4. CCF().exec(cpu)
  5. assert cpu.carry == 1
  6. assert cpu.cycles == 4
  7. CCF().exec(cpu)
  8. assert cpu.carry == 0
  9. assert cpu.cycles == 8
  10. def test_scf():
  11. cpu = CPU()
  12. SCF().exec(cpu)
  13. assert cpu.carry == 1
  14. assert cpu.cycles == 4