summaryrefslogtreecommitdiff
path: root/unittests/unittest.h
blob: bbc49613591156c88e974a66ec605d1670c08631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef FIO_UNITTEST_H
#define FIO_UNITTEST_H

#include <sys/types.h>

#include <CUnit/CUnit.h>
#include <CUnit/Basic.h>

struct fio_unittest_entry {
	const char *name;
	CU_TestFunc fn;
};

/* XXX workaround lib/memalign.c's dependency on smalloc.c */
void *smalloc(size_t);
void sfree(void*);

CU_ErrorCode fio_unittest_add_suite(const char*, CU_InitializeFunc,
	CU_CleanupFunc, struct fio_unittest_entry*);

CU_ErrorCode fio_unittest_lib_memalign(void);
CU_ErrorCode fio_unittest_lib_strntol(void);
CU_ErrorCode fio_unittest_oslib_strlcat(void);
CU_ErrorCode fio_unittest_oslib_strndup(void);
CU_ErrorCode fio_unittest_oslib_strcasestr(void);
CU_ErrorCode fio_unittest_oslib_strsep(void);

#endif