int main (int argc, char *argv[]) { #ifdef __SYMBIAN32__ g_log_set_handler (NULL, G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG, &mrtLogHandler, NULL); g_set_print_handler(mrtPrintHandler); #endif run_tests (); #ifdef __SYMBIAN32__ testResultXml("spawn_test"); #endif /* EMULATOR */ return 0; }
int main() { UnitTest tests[] = { unit_test_setup(enron_suite, fixture_setup_enron), unit_test_setup_teardown(test_isend1, setup, teardown), unit_test_setup_teardown(test_isend2, setup, teardown), unit_test_setup_teardown(test_irecv, setup, teardown), unit_test_setup_teardown(test_nsend, setup, teardown), unit_test_setup_teardown(test_nrecv, setup, teardown), unit_test_setup_teardown(test_nsend2, setup, teardown), unit_test_setup_teardown(test_nrecv2, setup, teardown), unit_test_setup_teardown(test_ncosib, setup, teardown), unit_test_setup_teardown(test_nsib, setup, teardown), unit_test_teardown(enron_suite, fixture_teardown), }; return run_tests(tests); }
int main(int argc, char **argv) { grpc_closure destroyed; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_test_init(argc, argv); grpc_init(); g_pollset = gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); grpc_endpoint_tests(configs[0], g_pollset, g_mu); run_tests(); grpc_closure_init(&destroyed, destroy_pollset, g_pollset, grpc_schedule_on_exec_ctx); grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); gpr_free(g_pollset); return 0; }
int main() { PRINT_TEST_BANNER(); const UnitTest tests[] = { unit_test(test_initList) , unit_test(test_destroyList) , unit_test(test_destroyer) , unit_test(test_prependToList) , unit_test(test_appendToList) , unit_test(test_removeFromList) , unit_test(test_copyList) , unit_test(test_iterator) , unit_test(test_mutableIterator) }; return run_tests(tests); }
int main() { const UnitTest tests[] = { unit_test( test_lookup_empty_table_returns_NULL ), unit_test( test_insert_and_lookup ), unit_test( test_insert_and_lookup_by_atom_hash ), unit_test( test_insert_twice_overwrites_old_value ), unit_test( test_delete_entry ), unit_test( test_nonexistent_entry_returns_NULL ), unit_test( test_map ), unit_test( test_foreach ), unit_test( test_iterator ), unit_test( test_multiple_inserts_and_deletes_then_iterate ), unit_test( test_iterate_empty_hash ), }; setup_leak_detector(); return run_tests( tests ); }
int main() { const UnitTest tests[] = { unit_test(test_newentry), unit_test(test_update), unit_test(test_reverse_missing), unit_test(test_reverse_conflict), unit_test(test_reverse_missing_forward), unit_test(test_remove), }; int ret = run_tests(tests); teardown(); return ret; }
int main() { PRINT_TEST_BANNER(); const UnitTest tests[] = { unit_test(test_split_empty), unit_test(test_split_easy), unit_test(test_split_quoted_beginning), unit_test(test_split_quoted_middle), unit_test(test_split_quoted_end), unit_test(test_complex_quoting), unit_test(test_arguments_resize_for_null), unit_test(test_arguments_resize), unit_test(test_command_promiser), }; return run_tests(tests); }
int torture_run_tests(void) { const UnitTest tests[] = { unit_test_setup_teardown(check_csync_detect_update, setup, teardown_rm), unit_test_setup_teardown(check_csync_detect_update_db_none, setup, teardown), unit_test_setup_teardown(check_csync_detect_update_db_eval, setup, teardown), unit_test_setup_teardown(check_csync_detect_update_db_rename, setup, teardown), unit_test_setup_teardown(check_csync_detect_update_db_new, setup, teardown_rm), unit_test_setup_teardown(check_csync_detect_update_nlink, setup, teardown_rm), unit_test_setup_teardown(check_csync_detect_update_null, setup, teardown_rm), unit_test_setup_teardown(check_csync_ftw, setup_ftw, teardown_rm), unit_test_setup_teardown(check_csync_ftw_empty_uri, setup_ftw, teardown_rm), unit_test_setup_teardown(check_csync_ftw_failing_fn, setup_ftw, teardown_rm), }; return run_tests(tests); }
int main() { tests_setup(); const UnitTest tests[] = { unit_test(test_no_migration), unit_test(test_up_to_date), unit_test(test_migrate_unqualified_names), }; PRINT_TEST_BANNER(); int ret = run_tests(tests); tests_teardown(); return ret; }
int main() { PRINT_TEST_BANNER(); const UnitTest tests[] = { unit_test(test_plain_variable_with_no_stuff_in_it), unit_test(test_namespaced), unit_test(test_scoped), unit_test(test_full), unit_test(test_dotted_array), unit_test(test_levels), unit_test(test_unqualified_array), unit_test(test_qualified_array), unit_test(test_to_string) }; return run_tests(tests); }
int test_main(int argc, char *argv[]) { int ret; bio_err = dup_bio_err(FORMAT_TEXT); #ifndef OPENSSL_NO_UI ADD_TEST(test_old); ADD_TEST(test_new_ui); #endif ret = run_tests(argv[0]); (void)BIO_flush(bio_err); BIO_free(bio_err); return ret; }
int main() { PRINT_TEST_BANNER(); const UnitTest tests[] = { unit_test(test_create_destroy), unit_test(test_append), unit_test(test_lookup), unit_test(test_index_of), unit_test(test_sort), unit_test(test_remove_range), unit_test(test_remove), unit_test(test_reverse), unit_test(test_len) }; return run_tests(tests); }
int main(int argc, char **argv) { if (platform_init(argc, argv)) return EXIT_FAILURE; argv = uv_setup_args(argc, argv); switch (argc) { case 1: return run_tests(0); case 2: return maybe_run_test(argc, argv); case 3: return run_test_part(argv[1], argv[2]); default: fprintf(stderr, "Too many arguments.\n"); fflush(stderr); return EXIT_FAILURE; } return EXIT_SUCCESS; }
int main(int argc, char **argv) { struct sigaction sigact; /* Make stdout line buffered */ if (0 != setvbuf(stdout, NULL, _IOLBF, 0)) { perror("Setting stdout to line buffered mode"); return 99; } if (argc < 2) { fprintf(stderr, "Usage: %s <prog>\n", argv[0]); return 99; } /* Set up pipe for SIGCHLD */ if (0 != pipe(chld_fds)) { perror("Making pipe"); return 99; } if (0 != setnonblock("child pipe read end", chld_fds[0]) || 0 != setnonblock("child pipe write end", chld_fds[1])) { return 99; } /* Set up signal handlers */ sigact.sa_handler = sig_handler; sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_NOCLDSTOP; if (0 != sigaction(SIGCHLD, &sigact, NULL)) { perror("Setting up SIGCHLD handler"); return 99; } sigact.sa_handler = SIG_IGN; sigact.sa_flags = 0; if (0 != sigaction(SIGPIPE, &sigact, NULL)) { perror("Setting SIGPIPE to ignore"); return EXIT_FAILURE; } /* Run the tests */ if (run_tests(argc - 1, argv + 1) != 0) return 1; return 0; }
int main(int argc, char **argv) { char do_read = 0; char *infile = NULL; argc--, argv++; /* process the args */ for (; *argv != NULL; argc--, argv++) { if (**argv != '-') { continue; } switch (*(*argv + 1)) { case 'r': do_read = 1; argc--; argv++; if (argc == 0) { usage(); } infile = *argv; break; default: usage(); break; } } if (argc > 0) { usage(); } /* do we need to read in from stdin */ if (do_read) { read_file(infile); } else { run_tests(); } return 0; }
int main(int argc, char **argv) { int i; /* If there are no arguments then show help */ if (argc <= 1) { show_help(); return 0; } /* Parse the arguments */ for (i = 1; i < argc; i++) { /* show help */ if ((strcmp(argv[i],"-h")==0) || (strcmp(argv[i],"--help")==0)) { show_help(); return 0; } if ((strcmp(argv[i],"-t")==0) || (strcmp(argv[i],"--tests")==0)) { run_tests(); return 0; } if (((strcmp(argv[i],"-r")==0) || (strcmp(argv[i],"--run")==0)) && argc == 4) { char * repos_dir; int generation_max; repos_dir=argv[i+1]; generation_max=atoi(argv[i+2]); run_simulation(repos_dir, generation_max); return 0; } } printf("Error: Unexpected arguments\n\n"); printf("%d passed\n",argc); show_help(); return 0; }
int main() { int rc = 0; #if defined(PSO_UNIT_TESTS) const UnitTest tests[] = { unit_test_setup_teardown( test_null_data, setup_test, teardown_test ), unit_test_setup_teardown( test_null_handle, setup_test, teardown_test ), unit_test_setup_teardown( test_null_key, setup_test, teardown_test ), unit_test_setup_teardown( test_null_length, setup_test, teardown_test ), unit_test_setup_teardown( test_wrong_handle, setup_test, teardown_test ), unit_test_setup_teardown( test_zero_length, setup_test, teardown_test ), unit_test_setup_teardown( test_pass, setup_test, teardown_test ), }; rc = run_tests(tests); #endif return rc; }
int main( void ) { const UnitTest tests[] = { unit_test( test_instructions ), unit_test_setup_teardown( test_bucket_list, create_bucket_list, destroy_bucket_list ), unit_test_setup_teardown( test_request_port_desc, create_port_desc, destroy_port_desc ), unit_test_setup_teardown( test_request_group_features, create_group_features, destroy_group_features ), unit_test_setup_teardown( test_action_list_length, create_action_list, destroy_action_list ), unit_test_setup_teardown( test_bucket_list_length, create_bucket_list, destroy_bucket_list ), unit_test_setup_teardown( test_pack_bucket, create_bucket_list, destroy_bucket_list ), unit_test( test_count_features ), unit_test( test_assign_instruction_ids ), unit_test( test_assign_action_ids ), unit_test( test_assign_table_features ), unit_test( test_retrieve_flow_stats ), unit_test( test_desc_stats ), }; return run_tests( tests ); }
int main() { PRINT_TEST_BANNER(); const UnitTest tests[] = { unit_test(test_get_in_default_namespace), unit_test(test_get_different_namespaces), unit_test(test_get_indices), unit_test(test_iterate_indices_ordering_related), unit_test(test_multi_index_array_conflation), unit_test(test_replace), unit_test(test_remove), unit_test(test_clear), unit_test(test_counting), unit_test(test_iterate_indices), }; return run_tests(tests); }
int test_main(int argc, char *argv[]) { int testresult = 1; if (!TEST_int_eq(argc, 3)) return 1; cert = argv[1]; privkey = argv[2]; ADD_ALL_TESTS(test_dtls_unprocessed, NUM_TESTS); testresult = run_tests(argv[0]); bio_f_tls_dump_filter_free(); bio_s_mempacket_test_free(); return testresult; }
int main(int argc, char *argv[]) { if (argc > 1) get_options(argc, argv); get_envvars(); unsigned long lasttick; lasttick = GetTickCount(); run_tests(my_tests); char cmd[128]; snprintf(cmd,128, "Run for time %dms\n", (GetTickCount() - lasttick) ); printf("%s",cmd); return(exit_status()); return 0; }
int main(int argc, char *argv[]) { if(argc > 1 && strcmp(argv[1], "-test") == 0) { run_tests(); } else { int w = WIDTH / 2, h = HEIGHT / 2; // Pos board[3] = { // {w - 1, h}, {w, h}, {w + 1, h} // }; // ******** ***** *** ******* ***** // ******** ***** *** ******* ***** // ******** ***** *** ******* ***** // <1sp><8*><1sp><5*><3sp><3*><6sp><7*><1sp><5*><1sp> // 1 + 8 + 1 + 5 + 3 + 3 + 6 + 7 + 1 + 5 + 1 = 41 // 8 + 5 + 3 + 7 + 5 = 28 Pos board[100] = { {.x = w-19, .y = h}, {w-18,h}, {w-17,h}, {w-16,h}, {w-15,h}, {w-14,h}, {w-13,h}, {w-12,h},
int main() { const UnitTest tests[] = { unit_test(test_prepend_scalar), unit_test(test_prepend_scalar_idempotent), unit_test(test_length), unit_test(test_copy), unit_test(test_rval_to_scalar), unit_test(test_rval_to_scalar2), unit_test(test_rval_to_list), unit_test(test_rval_to_list2), unit_test(test_rval_to_fncall), unit_test(test_rval_to_fncall2), unit_test(test_last), }; return run_tests(tests); }
int main() { const UnitTest tests[] = { unit_test_setup_teardown( test_create_and_delete_message_queue, setup, teardown ), unit_test_setup_teardown( test_delete_message_queue_if_queue_is_not_created, setup, teardown ), unit_test_setup_teardown( test_enqueue_and_delete_message_queue, setup, teardown ), unit_test_setup_teardown( test_enqueue_and_dequeue_message_queue, setup, teardown ), unit_test_setup_teardown( test_multiple_queueing, setup, teardown ), unit_test_setup_teardown( test_enqueue_message_if_queue_is_not_created, setup, teardown ), unit_test_setup_teardown( test_enqueue_message_if_message_is_NULL, setup, teardown ), unit_test_setup_teardown( test_dequeue_message_if_queue_is_not_created, setup, teardown ), unit_test_setup_teardown( test_peek_message, setup, teardown ), unit_test_setup_teardown( test_peek_message_if_queue_is_not_created, setup, teardown ), unit_test_setup_teardown( test_foreach_message_queue, setup, teardown ), unit_test_setup_teardown( test_foreach_message_queue_if_queue_is_empty, setup, teardown ), }; return run_tests( tests ); }
int main(int argc, char* argv[]) { cmockery_parse_arguments(argc, argv); const UnitTest tests[] = { unit_test_setup_teardown(test__build_http_header__remote_login_is_null, common_setup, common_teardown), unit_test_setup_teardown(test__build_http_header__remote_login_is_not_null, common_setup, common_teardown), unit_test_setup_teardown(test__build_http_header__remote_credentials_are_not_null, common_setup, common_teardown), unit_test_setup_teardown(test__get_format_name, common_setup, common_teardown) }; return run_tests(tests); }
int main(int argc, char* argv[]) { cmockery_parse_arguments(argc, argv); const UnitTest tests[] = { unit_test(test__GUCArrayReset__superuser), unit_test(test__GUCArrayReset__NULL_array), unit_test(test__GUCArrayReset__all_userset_guc), unit_test(test__GUCArrayReset__all_non_userset_guc), unit_test(test__GUCArrayReset__mix_guc), unit_test(test__GUCArrayReset__invalid_guc), unit_test(test__GUCArrayReset__md_array), unit_test(test__set_config_option), unit_test(test__find_option) }; return run_tests(tests); }
int main(int argc, char* argv[]) { cmockery_parse_arguments(argc, argv); const UnitTest tests[] = { unit_test(test__IdleTracker_ShmemInit__InitializesGlobalVarsWhenPostmaster), unit_test(test__IdleTracker_Init__ActivatesProcess), unit_test(test__IdleTracker_ActivateProcess__ActivatesProcess), unit_test(test__IdleTracker_DeactivateProcess__DeactivatesProcessWithCleanup), unit_test(test__IdleTracker_Shutdown__DeactivatesProcessWithCleanup), unit_test(test__IdleTracker_DeactivateProcess__DeactivatesProcessWithoutCleanup), unit_test(test__IdleTracker_Shutdown__DeactivatesProcessWithoutCleanup), unit_test(test__IdleTracker_DeactivateProcess__IgnoresDeactivationDuringProcExit), unit_test(test__IdleTracker_Shutdown__IgnoresDeactivationDuringProcExit), }; return run_tests(tests); }
int main(int argc, char **argv) { product_t prods[8]; int rv = -1; int i; int rmCnt = 0; btlogger_debug( "TxLog %s:%d", __FUNCTION__, __LINE__); if (argc > 1) { for (i = 1; i < argc; i++) { product_t *p = get_product(argv[i]); if (p == NULL) { btlogger_debug("TxLog product id %s not found", argv[i]); for (p = products; p->id != -1; p++) btlogger_debug("TxLog product id %d", p->id); //return fatal("Requested db is not supported\n"); } else { prods[rmCnt++] = *p; } } prods[rmCnt].id = -1; prods[rmCnt].access = 0; prods[rmCnt].xaflags = 0; } else { for (i = 0; products[i].id != -1; i++) prods[i] = products[i]; prods[i] = products[i]; } for (i = 0; prods[i].id != -1; i++) { btlogger_debug("TxLog INFO: %s (%s) id=%d flags=0x%x", prods[i].pname, prods[i].dbname, prods[i].id, prods[i].xaflags()); } rv = run_tests(prods); btlogger("TxLog Test %s (%d)\n", (rv ? "failed" : "passed"), rv); return rv; }
/** * Media Library Test Runner * - load a number of tests from json files * - by default, run tests as unit tests * - optionally run tests as performance tests, but then require a db directory */ gint main (gint argc, gchar **argv) { xmmsv_t *testcases, *databases; xmms_test_args_t args = { 0 }; g_thread_init (0); xmms_log_init (0); parse_command_line (argc, argv, &args); g_log_set_default_handler (simple_log_handler, (gpointer) &args); g_debug ("Test variant: %s", args.variant == UNITTEST ? "unit test" : "performance test"); g_debug ("Output format: %s", args.format == FORMAT_PRETTY ? "pretty" : "csv"); g_debug ("Database path: %s", args.database_path); g_debug ("Testcase path: %s", args.testcase_path); testcases = scan_path (args.testcase_path, filter_testcase); if (args.variant == PERFORMANCE) { if (args.format == FORMAT_CSV) g_print ("\"dataset\",\"test\",\"success\",\"duration\"\n"); else g_print (" - Running Performance Test -\n"); databases = scan_path (args.database_path, filter_databases); run_performance_tests (databases, testcases, args.format); xmmsv_unref (databases); } else { if (args.format == FORMAT_CSV) g_print ("\"test\",\"success\"\n"); else g_print (" - Running Unit Test -\n"); run_tests (NULL, testcases, run_unit_test, args.format, NULL); } xmmsv_unref (testcases); return EXIT_SUCCESS; }
int main(int argc, char **argv) { pid_t pid[PNUM]; int status; unsigned int success = 0; setenv("QEO_DOMAIN_ID", "101", 0); for (unsigned int i = 0; i < PNUM; i++) { pid[i] = fork(); assert(-1 != pid[i]); if (0 == pid[i]) { run_tests(); return EXIT_SUCCESS; } } for (unsigned int i = 0; i < PNUM; i++) { log_verbose("Waiting for process with ID %d", pid[i]); assert(pid[i] == waitpid(pid[i], &status, 0)); if (WIFEXITED(status)) { ; } else if (WIFSIGNALED(status)) { printf("killed by signal %s\n", strsignal(WTERMSIG(status))); } else if (WIFSTOPPED(status)) { printf("stopped by signal %s\n", strsignal(WSTOPSIG(status))); } else if (WIFCONTINUED(status)) { printf("continued\n"); } if (status == 0){ ++success; } } if (success == PNUM){ return EXIT_SUCCESS; } else { printf("%u/%u childs did not exit cleanly !", PNUM - success, PNUM); return EXIT_FAILURE; } }