1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-01 04:04:28 +00:00
erc-c/include/mos6502.tests.h
Peter Evans 00ff9f069d Vastly simplify unit tests for mos6502
Criterion's init and fini config options allow us to register setup and
teardown functions. We now use this to register the common cpu variable
for the mos6502 tests, albeit through the use of a global variable.

Doing so necessitated that each of the different test files have their
own suites, due to some implementation details in Criterion, but this is
No Big Deal.
2017-12-06 15:57:15 -06:00

19 lines
184 B
C

#ifndef _MOS6502_TESTS_H
#define _MOS6502_TESTS_H
static mos6502 *cpu;
static void
setup()
{
cpu = mos6502_create();
}
static void
teardown()
{
mos6502_free(cpu);
}
#endif