Add test for csync_vio_file_stat.

This commit is contained in:
Andreas Schneider 2008-04-16 10:32:33 +02:00
parent ec5d3afea0
commit 7bd9c7753d
2 changed files with 45 additions and 1 deletions

View file

@ -32,10 +32,13 @@ macro_add_check_test(check_std_c_str std_tests/check_std_c_str.c ${TEST_TARGET_L
macro_add_check_test(check_logger log_tests/check_log.c ${TEST_TARGET_LIBRARIES})
macro_add_check_test(check_csync csync_tests/check_csync.c ${TEST_TARGET_LIBRARIES})
macro_add_check_test(check_csync_lock csync_tests/check_csync_lock.c ${TEST_TARGET_LIBRARIES})
macro_add_check_test(check_csync_config csync_tests/check_csync_config.c ${TEST_TARGET_LIBRARIES})
if (DEVELOPER)
macro_add_check_test(check_csync_config csync_tests/check_csync_config.c ${TEST_TARGET_LIBRARIES})
endif (DEVELOPER)
macro_add_check_test(check_csync_exclude csync_tests/check_csync_exclude.c ${TEST_TARGET_LIBRARIES})
macro_add_check_test(check_csync_journal csync_tests/check_csync_journal.c ${TEST_TARGET_LIBRARIES})
# vio
macro_add_check_test(check_vio_handle vio_tests/check_vio_handle.c ${TEST_TARGET_LIBRARIES})
macro_add_check_test(check_vio_file_stat vio_tests/check_vio_file_stat.c ${TEST_TARGET_LIBRARIES})

View file

@ -0,0 +1,41 @@
#include "support.h"
#include "vio/csync_vio_file_stat_private.h"
START_TEST (check_csync_vio_file_stat_new)
{
csync_vio_file_stat_t *stat = NULL;
stat = csync_vio_file_stat_new();
fail_if(stat == NULL, NULL);
csync_vio_file_stat_destroy(stat);
}
END_TEST
static Suite *csync_vio_suite(void) {
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;
}
int main(void) {
int nf;
Suite *s = csync_vio_suite();
SRunner *sr;
sr = srunner_create(s);
#if 0
srunner_set_fork_status(sr, CK_NOFORK);
#endif
srunner_run_all(sr, CK_VERBOSE);
nf = srunner_ntests_failed(sr);
srunner_free(sr);
return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}