int main(int argc, char *argv[]) { /*int retvalue;*/ if (system("./reply reply &> /dev/null") == -1) printf("system cmd failed\n"); sleep(1); if (test_one()) exit(1); if (test_two()) exit(1); /*retvalue = init_memshare("memtest", SHMEMSIEZ, QUEUESIZE);*/ data_register(data_callback); signal1_register(signal1_callback); signal2_register(signal2_callback); signal3_register(signal3_callback); sleep(2); if (test_three()) exit(1); if (test_four()) exit(1); if (test_five(LARGE_NUM)) exit(1); if (test_five(LARGER_NUM) != 0) exit(1); if (test_five(LARGE_NUM)) exit(1); if (test_six()) exit(1); test_seven(); data("reply", "exit\0", strlen("exit") + 1); return 0; }
void ut_FileReaderSimple::test_Driver() { string filename = ut_Directory + "ut_FileReaderSimple.out"; root.assign("c:\\temp\\ut_file_reader_simple"); ut_out.open(filename.c_str()); if (!ut_out){ ut_out << "Can not open file ..." << filename << endl; return; } ///----create the pending dir------ if (0 != f_File::mkdirRecursive(root)) { ut_out << "Can not create recursive dir: " << root << endl; return; }; ///----set configs------ ut_out << "\n========================================================\n"; ut_out << "\nCONFIGS\n"; ut_out << "\n========================================================\n"; if (this->initReader() != Success){ ut_out << "initReader initialization failed ..." << endl; } else { this->config.dump(ut_out); ut_out << "\n========================================================\n"; ut_out << "\nRunning tests ....\n"; ut_out << "\n========================================================\n"; test_one(); test_two(); test_three(); test_four(); test_five(); test_six(); test_seven(); test_eight(); } ut_out.close(); }