2016-09-09 17:20:09 +02:00
|
|
|
#include <platform.h>
|
|
|
|
|
|
|
|
#include "summary.h"
|
|
|
|
#include "calendar.h"
|
|
|
|
|
|
|
|
#include <CuTest.h>
|
|
|
|
#include "tests.h"
|
|
|
|
|
2016-09-09 17:29:17 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2016-09-09 17:20:09 +02:00
|
|
|
static void test_summary(CuTest * tc)
|
|
|
|
{
|
|
|
|
struct summary *sum;
|
|
|
|
test_setup();
|
2016-09-09 17:40:36 +02:00
|
|
|
test_create_faction(0);
|
|
|
|
test_create_faction(0);
|
2016-09-09 17:20:09 +02:00
|
|
|
sum = make_summary();
|
|
|
|
report_summary(sum, sum, true);
|
|
|
|
CuAssertIntEquals(tc, 0, remove("parteien.full"));
|
2016-09-15 21:16:37 +02:00
|
|
|
CuAssertIntEquals(tc, 0, remove("datum"));
|
|
|
|
CuAssertIntEquals(tc, 0, remove("turn"));
|
2016-09-09 17:20:09 +02:00
|
|
|
free_summary(sum);
|
|
|
|
test_cleanup();
|
|
|
|
}
|
|
|
|
|
|
|
|
CuSuite *get_summary_suite(void)
|
|
|
|
{
|
|
|
|
CuSuite *suite = CuSuiteNew();
|
|
|
|
SUITE_ADD_TEST(suite, test_summary);
|
|
|
|
return suite;
|
|
|
|
}
|