char *all_specs() { spec_setup("Brick Hash"); run_spec(test_create_hash); run_spec(test_get_value_from_empty); run_spec(test_set_value); run_spec(test_reset_value); spec_teardown(); return NULL; }
char *all_specs() { spec_setup("Native Object"); run_spec(test_set_and_get_attribute); spec_teardown(); return NULL; }
char *all_specs() { spec_setup("Brick FxB_Array"); run_spec(test_create_array); run_spec(test_fxb_array_push); run_spec(test_fxb_array_push_multiple_times); run_spec(test_fxb_array_push_until_expansion); run_spec(test_fxb_array_pop); run_spec(test_fxb_array_set_at_index); run_spec(test_fxb_array_set_at_index_bug); spec_teardown(); return NULL; }
int main(int argc, char *argv[]) { char *devpath = NULL; const char options[] = "vd:D:EFpt:"; xusb_filter_t filter = NULL; int timeout = 500; /* millies */ int i; progname = argv[0]; while (1) { int c; c = getopt(argc, argv, options); if (c == -1) break; switch (c) { case 'D': devpath = optarg; filter = xusb_filter_bypath; break; case 'v': verbose++; break; case 't': timeout = strtoul(optarg, NULL, 0); break; case 'd': debug_mask = strtoul(optarg, NULL, 0); break; case 'h': default: ERR("Unknown option '%c'\n", c); usage(); } } i = 0; while (run_spec(i, filter, devpath, timeout)) i++; return 0; }
int main(int argc, char **argv) { test_spec *spec; size_t i; const size_t NUM_ITERS = 10; const size_t NUM_SERVERS = 4; grpc_test_init(argc, argv); grpc_init(); grpc_lb_round_robin_trace = 1; GPR_ASSERT(grpc_lb_policy_create("this-lb-policy-does-not-exist", NULL) == NULL); GPR_ASSERT(grpc_lb_policy_create(NULL, NULL) == NULL); spec = test_spec_create(NUM_ITERS, NUM_SERVERS); /* everything is fine, all servers stay up the whole time and life's peachy */ spec->verifier = verify_vanilla_round_robin; spec->description = "test_all_server_up"; run_spec(spec); /* Kill all servers first thing in the morning */ test_spec_reset(spec); spec->verifier = verify_total_carnage_round_robin; spec->description = "test_kill_all_server"; for (i = 0; i < NUM_SERVERS; i++) { spec->kill_at[0][i] = 1; } run_spec(spec); /* at the start of the 2nd iteration, kill all but the first and last * servers. * This should knock down the server bound to be selected next */ test_spec_reset(spec); spec->verifier = verify_vanishing_floor_round_robin; spec->description = "test_kill_all_server_at_2nd_iteration"; for (i = 1; i < NUM_SERVERS - 1; i++) { spec->kill_at[1][i] = 1; } run_spec(spec); /* Midway, kill all servers. */ test_spec_reset(spec); spec->verifier = verify_partial_carnage_round_robin; spec->description = "test_kill_all_server_midway"; for (i = 0; i < NUM_SERVERS; i++) { spec->kill_at[spec->num_iters / 2][i] = 1; } run_spec(spec); /* After first iteration, kill all servers. On the third one, bring them all * back up. */ test_spec_reset(spec); spec->verifier = verify_rebirth_round_robin; spec->description = "test_kill_all_server_after_1st_resurrect_at_3rd"; for (i = 0; i < NUM_SERVERS; i++) { spec->kill_at[1][i] = 1; spec->revive_at[3][i] = 1; } run_spec(spec); test_spec_destroy(spec); test_pending_calls(4); test_ping(); grpc_shutdown(); return 0; }
char *all_specs() { spec_setup("Parsing Expressions"); run_spec(test_operator_method_call); run_spec(test_implicit_method_call_with_parens); run_spec(test_implicit_method_call_no_parens); run_spec(test_two_expressions); run_spec(test_empty_function); run_spec(test_empty_function_with_line_end); run_spec(test_function_with_expression); run_spec(test_function_with_two_expressions); run_spec(test_expression_function_with_expression_expression); run_spec(test_parened_method_call); run_spec(test_no_parens_method_call); run_spec(test_method_call_with_block); run_spec(test_multi_operator_method); run_spec(test_function_assignment); run_spec(test_grouped_expression_method_call); run_spec(test_multi_line_group); run_spec(test_multi_line_method_call); run_spec(test_native_assignment); run_spec(test_block_assignment); run_spec(test_import_expression); run_spec(test_import_with_parens); run_spec(test_native_no_parens); run_spec(test_native_with_args); run_spec(test_parse_from_file); spec_teardown(); return NULL; }