nextcloud-desktop/tests/csync_tests/check_csync_util.c
2013-03-01 10:06:06 +01:00

34 lines
634 B
C

#include "torture.h"
#include "csync_util.h"
static void check_csync_instruction_str(void **state)
{
const char *str;
(void) state; /* unused */
str = csync_instruction_str(CSYNC_INSTRUCTION_ERROR);
assert_string_equal(str, "INSTRUCTION_ERROR");
str = csync_instruction_str(0xFFFF);
assert_string_equal(str, "ERROR!");
}
static void check_csync_memstat(void **state)
{
(void) state; /* unused */
csync_memstat_check();
}
int torture_run_tests(void)
{
const UnitTest tests[] = {
unit_test(check_csync_instruction_str),
unit_test(check_csync_memstat),
};
return run_tests(tests);
}