2018-01-03 07:00:51 +00:00
|
|
|
#include <criterion/criterion.h>
|
|
|
|
|
|
|
|
#include "apple2.h"
|
|
|
|
#include "apple2.mem.h"
|
2018-01-13 04:06:49 +00:00
|
|
|
#include "apple2.bank.h"
|
2018-01-03 07:00:51 +00:00
|
|
|
|
|
|
|
static apple2 *mach = NULL;
|
|
|
|
|
|
|
|
static void
|
|
|
|
setup()
|
|
|
|
{
|
|
|
|
mach = apple2_create(100, 100);
|
2018-01-03 21:21:24 +00:00
|
|
|
vm_segment_set_map_machine(mach);
|
2018-01-03 07:00:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
teardown()
|
|
|
|
{
|
|
|
|
apple2_free(mach);
|
2018-01-03 21:21:24 +00:00
|
|
|
vm_segment_set_map_machine(NULL);
|
2018-01-03 07:00:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TestSuite(apple2_mem, .init = setup, .fini = teardown);
|
|
|
|
|
2018-01-12 03:58:17 +00:00
|
|
|
Test(apple2_mem, init_peripheral_rom)
|
2018-01-07 20:46:29 +00:00
|
|
|
{
|
|
|
|
// FIXME: this isn't working, _and_ it's pretty tightly coupled into
|
|
|
|
// the create() function. We could use a better way of testing this.
|
|
|
|
//cr_assert_eq(apple2_mem_init_disk2_rom(mach), OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
Test(apple2_mem, init_sys_rom)
|
|
|
|
{
|
|
|
|
// FIXME: same
|
|
|
|
//cr_assert_eq(apple2_mem_init_sys_rom(mach), OK);
|
|
|
|
}
|