1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-12-21 23:29:16 +00:00

Add test for switch_latch

This commit is contained in:
Peter Evans 2018-02-04 11:32:23 -06:00
parent 50dfca476b
commit f696346806

View File

@ -267,3 +267,16 @@ Test(apple2_dd, switch_drive)
apple2_free(mach);
}
Test(apple2_dd, switch_latch)
{
drive->latch = 0;
drive->mode = DD_READ;
apple2_dd_switch_latch(drive, 3);
cr_assert_eq(drive->latch, 0);
drive->mode = DD_WRITE;
apple2_dd_switch_latch(drive, 5);
cr_assert_eq(drive->latch, 5);
}