1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-12-21 08:30:55 +00:00

Testing relative label assignments

This commit is contained in:
Peter Evans 2017-12-29 17:14:20 -06:00
parent 26529f77ab
commit b7211f43c2

View File

@ -239,9 +239,18 @@ Test(mos6502_dis, jump_label)
mos6502_dis_jump_label(123, 0, IND);
cr_assert_eq(mos6502_dis_is_jump_label(123), true);
mos6502_dis_jump_unlabel(123);
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)