fuse_kafka
src/minunit.c
00001 // LCOV_EXCL_START
00002 #include <sys/ioctl.h>
00003 #include <unistd.h>
00004 #include <signal.h>
00005 int tests_run = 0;
00006 void line()
00007 {
00008     int i;
00009     struct winsize w;
00010     ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
00011     for(i = 0; i < w.ws_col; i++) printf("=");
00012     printf("\n");
00013 }
00014 int main(int argc, char** argv)
00015 {
00016     time_t start,end;
00017     start=clock();
00018     line();
00019     char* result = all_tests();
00020     line();
00021     if (result != 0) printf("ASSERTION FAILED:\n%s\n", result);
00022     else printf("ALL TESTS PASSED\n");
00023     printf("Tests run: %d, duration: %f seconds\n", tests_run,
00024             (float) (clock()-start)/CLOCKS_PER_SEC);
00025     line();
00026     system("rm -f " TEST "/to");
00027     return result != 0;
00028 }
00029 // LCOV_EXCL_STOP
 All Data Structures Files Functions Variables Defines