gbemu/tests/test.c

31 lines
623 B
C
Raw Normal View History

2025-01-30 14:30:19 -07:00
#include <check.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <emu.h>
#include <cpu.h>
START_TEST(test_nothing) {
bool b = cpu_step();
ck_assert_uint_eq(b, false);
} END_TEST
Suite *stack_suite() {
Suite *s = suite_create("emu");
TCase *tc = tcase_create("core");
tcase_add_test(tc, test_nothing);
suite_add_tcase(s, tc);
return s;
}
int main(int argc, char **argv) {
Suite *s = stack_suite();
SRunner *sr = srunner_create(s);
srunner_run_all(sr, CK_NORMAL);
int nf = srunner_ntests_failed(sr);
srunner_free(sr);
return nf == 0 ? 0 : -1;
}