mirror of
https://github.com/pevans/erc-c.git
synced 2025-02-25 14:29:13 +00:00
Add encode/decode tests, skip for save
This commit is contained in:
parent
1245ddec55
commit
2d13e95d7f
@ -173,3 +173,29 @@ Test(apple2_dd, write_protect)
|
||||
apple2_dd_write_protect(drive, 2222);
|
||||
cr_assert(drive->write_protect);
|
||||
}
|
||||
|
||||
Test(apple2_dd, encode)
|
||||
{
|
||||
// Mostly we want to test if this handles the image types correct.
|
||||
// The encode function won't actually try to encode anything if the
|
||||
// image segment is NULL.
|
||||
drive->image_type = DD_NIBBLE; cr_assert_eq(apple2_dd_encode(drive), OK);
|
||||
drive->image_type = DD_DOS33; cr_assert_eq(apple2_dd_encode(drive), OK);
|
||||
drive->image_type = DD_PRODOS; cr_assert_eq(apple2_dd_encode(drive), OK);
|
||||
drive->image_type = -1; cr_assert_neq(apple2_dd_encode(drive), OK);
|
||||
}
|
||||
|
||||
Test(apple2_dd, decode)
|
||||
{
|
||||
// Same drill as for the encode test
|
||||
drive->image_type = DD_NIBBLE; cr_assert_eq(apple2_dd_encode(drive), OK);
|
||||
drive->image_type = DD_DOS33; cr_assert_eq(apple2_dd_encode(drive), OK);
|
||||
drive->image_type = DD_PRODOS; cr_assert_eq(apple2_dd_encode(drive), OK);
|
||||
drive->image_type = -1; cr_assert_neq(apple2_dd_encode(drive), OK);
|
||||
}
|
||||
|
||||
// Skipping this test because most everything it does is already tested
|
||||
// in some other capacity
|
||||
/* Test(apple2_dd, save) */
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user