mirror of
https://github.com/mre/mos6502.git
synced 2024-12-22 12:29:31 +00:00
Add branch_if_equal_test().
This commit is contained in:
parent
d42922a788
commit
c9ed9e1720
@ -910,6 +910,18 @@ fn branch_if_carry_set_test() {
|
||||
assert_eq!(machine.registers.program_counter, Address(0xABCD));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn branch_if_equal_test() {
|
||||
let mut machine = Machine::new();
|
||||
|
||||
machine.branch_if_equal(Address(0xABCD));
|
||||
assert_eq!(machine.registers.program_counter, Address(0));
|
||||
|
||||
machine.registers.status.or(PS_ZERO);
|
||||
machine.branch_if_equal(Address(0xABCD));
|
||||
assert_eq!(machine.registers.program_counter, Address(0xABCD));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn branch_if_minus_test() {
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user