2016-09-09 17:20:09 +02:00
|
|
|
#include <platform.h>
|
|
|
|
|
|
|
|
#include "summary.h"
|
2018-02-14 20:00:48 +01:00
|
|
|
#include "kernel/calendar.h"
|
2016-09-09 17:20:09 +02:00
|
|
|
|
|
|
|
#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();
|
2018-01-14 09:38:26 +01:00
|
|
|
test_create_faction(NULL);
|
|
|
|
test_create_faction(NULL);
|
2016-09-09 17:20:09 +02:00
|
|
|
sum = make_summary();
|
2018-01-27 21:44:36 +01:00
|
|
|
report_summary(sum, true);
|
2016-09-09 17:20:09 +02:00
|
|
|
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);
|
2017-12-27 19:58:39 +01:00
|
|
|
test_teardown();
|
2016-09-09 17:20:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
CuSuite *get_summary_suite(void)
|
|
|
|
{
|
|
|
|
CuSuite *suite = CuSuiteNew();
|
|
|
|
SUITE_ADD_TEST(suite, test_summary);
|
|
|
|
return suite;
|
|
|
|
}
|