2017-12-29 06:13:28 +01:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#include <platform.h>
|
|
|
|
#endif
|
2012-05-31 04:17:08 +02:00
|
|
|
#include <CuTest.h>
|
2012-05-14 22:09:57 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "functions.h"
|
|
|
|
|
|
|
|
|
2012-05-15 05:08:11 +02:00
|
|
|
static void test_functions(CuTest * tc)
|
2012-05-14 22:09:57 +02:00
|
|
|
{
|
2015-01-30 20:37:14 +01:00
|
|
|
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);
|
2012-05-14 22:09:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
CuSuite *get_functions_suite(void)
|
|
|
|
{
|
2015-01-30 20:37:14 +01:00
|
|
|
CuSuite *suite = CuSuiteNew();
|
|
|
|
SUITE_ADD_TEST(suite, test_functions);
|
|
|
|
return suite;
|
2012-05-14 22:09:57 +02:00
|
|
|
}
|