nextcloud-desktop/tests/vio_tests/check_vio_file_stat.c

48 lines
918 B
C
Raw Normal View History

2008-04-16 12:32:33 +04:00
#include "support.h"
#include "vio/csync_vio_file_stat.h"
2008-04-16 12:32:33 +04:00
START_TEST (check_csync_vio_file_stat_new)
{
csync_vio_file_stat_t *tstat = NULL;
2008-04-16 12:32:33 +04:00
tstat = csync_vio_file_stat_new();
fail_if(tstat == NULL, NULL);
2008-04-16 12:32:33 +04:00
csync_vio_file_stat_destroy(tstat);
2008-04-16 12:32:33 +04:00
}
END_TEST
2008-05-07 13:09:56 +04:00
static Suite *make_csync_vio_suite(void) {
2008-04-16 12:32:33 +04:00
Suite *s = suite_create("csync_vio_file_stat");
create_case(s, "check_csync_vio_file_stat_new", check_csync_vio_file_stat_new);
return s;
}
2008-05-07 13:09:56 +04:00
int main(int argc, char **argv) {
Suite *s = NULL;
SRunner *sr = NULL;
struct argument_s arguments;
2008-04-16 12:32:33 +04:00
int nf;
2008-05-07 13:09:56 +04:00
ZERO_STRUCT(arguments);
cmdline_parse(argc, argv, &arguments);
s = make_csync_vio_suite();
2008-04-16 12:32:33 +04:00
sr = srunner_create(s);
2008-05-07 13:09:56 +04:00
if (arguments.nofork) {
srunner_set_fork_status(sr, CK_NOFORK);
}
2008-04-16 12:32:33 +04:00
srunner_run_all(sr, CK_VERBOSE);
nf = srunner_ntests_failed(sr);
srunner_free(sr);
return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}