server/src/util/functions.test.c
Enno Rehling f98eab56c4 platform.h is only for WIN32 now.
replace MIN and MAX macros, they are BAD.
2017-12-29 06:13:28 +01:00

26 lines
550 B
C

#ifdef _MSC_VER
#include <platform.h>
#endif
#include <CuTest.h>
#include <stdio.h>
#include <string.h>
#include "functions.h"
static void test_functions(CuTest * tc)
{
pf_generic fun;
fun = get_function("herpderp");
CuAssertTrue(tc, !fun);
register_function((pf_generic)test_functions, "herpderp");
fun = get_function("herpderp");
CuAssertTrue(tc, fun == (pf_generic)test_functions);
}
CuSuite *get_functions_suite(void)
{
CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, test_functions);
return suite;
}