mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-19 13:32:03 +00:00
Testing relative label assignments
This commit is contained in:
parent
26529f77ab
commit
b7211f43c2
@ -239,9 +239,18 @@ Test(mos6502_dis, jump_label)
|
|||||||
|
|
||||||
mos6502_dis_jump_label(123, 0, IND);
|
mos6502_dis_jump_label(123, 0, IND);
|
||||||
cr_assert_eq(mos6502_dis_is_jump_label(123), true);
|
cr_assert_eq(mos6502_dis_is_jump_label(123), true);
|
||||||
|
|
||||||
mos6502_dis_jump_unlabel(123);
|
mos6502_dis_jump_unlabel(123);
|
||||||
cr_assert_eq(mos6502_dis_is_jump_label(123), false);
|
cr_assert_eq(mos6502_dis_is_jump_label(123), false);
|
||||||
|
|
||||||
|
// Testing forward relative
|
||||||
|
mos6502_dis_jump_label(123, 10, REL);
|
||||||
|
cr_assert_eq(mos6502_dis_is_jump_label(123 + 10), true);
|
||||||
|
mos6502_dis_jump_unlabel(123 + 10);
|
||||||
|
|
||||||
|
// Testing backward relative
|
||||||
|
mos6502_dis_jump_label(133, 1000, REL);
|
||||||
|
cr_assert_eq(mos6502_dis_is_jump_label(133 + 1000 - 256), true);
|
||||||
|
mos6502_dis_jump_unlabel(133 + 1000 - 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
Test(mos6502_dis, label)
|
Test(mos6502_dis, label)
|
||||||
|
Loading…
Reference in New Issue
Block a user