mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-23 07:30:31 +00:00
9122615df4
Adjust bus tests to this change.
47 lines
653 B
C
47 lines
653 B
C
#include <atf-c.h>
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "rk65c02.h"
|
|
#include "bus.h"
|
|
#include "utils.h"
|
|
|
|
ATF_TC_WITHOUT_HEAD(bus_init);
|
|
ATF_TC_BODY(bus_init, tc)
|
|
{
|
|
bus_t b;
|
|
|
|
b = bus_init();
|
|
|
|
ATF_CHECK(b.space != NULL);
|
|
|
|
bus_finish(&b);
|
|
}
|
|
|
|
ATF_TC_WITHOUT_HEAD(bus_load_file);
|
|
ATF_TC_BODY(bus_load_file, tc)
|
|
{
|
|
bus_t b;
|
|
const char *rompath;
|
|
|
|
b = bus_init();
|
|
|
|
rompath = rom_path("test_emulation_nop.rom", tc);
|
|
|
|
ATF_REQUIRE(bus_load_file(&b, 0xC000, rompath));
|
|
|
|
ATF_CHECK(b.space[0xC000] == 0xEA);
|
|
|
|
bus_finish(&b);
|
|
}
|
|
|
|
ATF_TP_ADD_TCS(tp)
|
|
{
|
|
ATF_TP_ADD_TC(tp, bus_init);
|
|
ATF_TP_ADD_TC(tp, bus_load_file);
|
|
|
|
return (atf_no_error());
|
|
}
|
|
|