mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-21 08:30:55 +00:00
Use apple2.tests.h for setup/teardown
This commit is contained in:
parent
37df8db225
commit
96b8b77f37
@ -1,25 +1,10 @@
|
||||
#include <criterion/criterion.h>
|
||||
|
||||
#include "apple2.h"
|
||||
#include "apple2.bank.h"
|
||||
#include "apple2.h"
|
||||
#include "apple2.tests.h"
|
||||
#include "vm_segment.h"
|
||||
|
||||
static apple2 *mach = NULL;
|
||||
|
||||
static void
|
||||
setup()
|
||||
{
|
||||
mach = apple2_create(100, 100);
|
||||
vm_segment_set_map_machine(mach);
|
||||
}
|
||||
|
||||
static void
|
||||
teardown()
|
||||
{
|
||||
apple2_free(mach);
|
||||
vm_segment_set_map_machine(NULL);
|
||||
}
|
||||
|
||||
TestSuite(apple2_bank, .init = setup, .fini = teardown);
|
||||
|
||||
Test(apple2_bank, map)
|
||||
|
@ -1,25 +1,10 @@
|
||||
#include <criterion/criterion.h>
|
||||
|
||||
#include "apple2.h"
|
||||
#include "apple2.dbuf.h"
|
||||
#include "apple2.h"
|
||||
#include "apple2.tests.h"
|
||||
#include "vm_segment.h"
|
||||
|
||||
static apple2 *mach = NULL;
|
||||
|
||||
static void
|
||||
setup()
|
||||
{
|
||||
mach = apple2_create(100, 100);
|
||||
vm_segment_set_map_machine(mach);
|
||||
}
|
||||
|
||||
static void
|
||||
teardown()
|
||||
{
|
||||
apple2_free(mach);
|
||||
vm_segment_set_map_machine(NULL);
|
||||
}
|
||||
|
||||
TestSuite(apple2_dbuf, .init = setup, .fini = teardown);
|
||||
|
||||
Test(apple2_dbuf, map)
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include <criterion/criterion.h>
|
||||
|
||||
#include "apple2.tests.h"
|
||||
|
||||
/* Test(apple2_draw, pixel) */
|
||||
/* Test(apple2_draw, pixel_lores) */
|
||||
/* Test(apple2_draw, text) */
|
||||
|
@ -1,24 +1,9 @@
|
||||
#include <criterion/criterion.h>
|
||||
|
||||
#include "apple2.bank.h"
|
||||
#include "apple2.h"
|
||||
#include "apple2.mem.h"
|
||||
#include "apple2.bank.h"
|
||||
|
||||
static apple2 *mach = NULL;
|
||||
|
||||
static void
|
||||
setup()
|
||||
{
|
||||
mach = apple2_create(100, 100);
|
||||
vm_segment_set_map_machine(mach);
|
||||
}
|
||||
|
||||
static void
|
||||
teardown()
|
||||
{
|
||||
apple2_free(mach);
|
||||
vm_segment_set_map_machine(NULL);
|
||||
}
|
||||
#include "apple2.tests.h"
|
||||
|
||||
TestSuite(apple2_mem, .init = setup, .fini = teardown);
|
||||
|
||||
|
@ -2,22 +2,7 @@
|
||||
|
||||
#include "apple2.h"
|
||||
#include "apple2.pc.h"
|
||||
|
||||
static apple2 *mach = NULL;
|
||||
|
||||
static void
|
||||
setup()
|
||||
{
|
||||
mach = apple2_create(100, 100);
|
||||
vm_segment_set_map_machine(mach);
|
||||
}
|
||||
|
||||
static void
|
||||
teardown()
|
||||
{
|
||||
apple2_free(mach);
|
||||
vm_segment_set_map_machine(NULL);
|
||||
}
|
||||
#include "apple2.tests.h"
|
||||
|
||||
TestSuite(apple2_pc, .init = setup, .fini = teardown);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user