Пример #1
0
char *all_tests() 
{
    mu_suite_start();
    srand(time(NULL));

    mu_run_test(test_operations);

    return NULL;
}
Пример #2
0
char *all_tests()
{

    mu_suite_start();

    mu_run_test(test_qsort);

    return NULL;
}
Пример #3
0
static char *all_tests(void)
{
    //vector tests
    mu_run_test(test_vector_create);
    mu_run_test(test_vector_get);
    mu_run_test(test_vector_set);
    mu_run_test(test_vector_init);
    mu_run_test(test_vector_set_and_get);
    mu_run_test(test_vector_length);
    mu_run_test(test_vector_resize);
    
    //stack tests
    mu_run_test(test_stack_create);
    mu_run_test(test_stack_pop);
    mu_run_test(test_stack_push_pop);

    return 0;
}
Пример #4
0
static const char *
all_tests(void)
{
  mu_run_test (test_parse_content_disposition);
  mu_run_test (test_subdir_p);
  mu_run_test (test_dir_matches_p);
  mu_run_test (test_commands_sorted);
  mu_run_test (test_cmd_spec_restrict_file_names);
  mu_run_test (test_path_simplify);
  mu_run_test (test_append_uri_pathel);
  mu_run_test (test_are_urls_equal);
  mu_run_test (test_is_robots_txt_url);

  return NULL;
}
Пример #5
0
char * all_tests() {
    mu_suite_start();

    mu_run_test(test_simple_matches);
    mu_run_test(test_simple_repetitions);
    mu_run_test(test_anchors);
    mu_run_test(test_blocks);
    mu_run_test(test_frontier);
    mu_run_test(test_balance);
    mu_run_test(test_set);
    mu_run_test(test_optional);
    mu_run_test(test_escaped);

    return NULL;
}
Пример #6
0
char *all_tests() {
  mu_suite_start();

  mu_run_test(test_create);
  mu_run_test(test_push_pop);
  mu_run_test(test_unshift);
  mu_run_test(test_remove);
  mu_run_test(test_shift);
  mu_run_test(test_destroy);
  mu_run_test(test_copy);
  mu_run_test(test_split);
  mu_run_test(test_join);

  return NULL;
}
Пример #7
0
char *all_tests() {
    mu_suite_start();

    mu_run_test(test_create);
    mu_run_test(test_global_variable);
    mu_run_test(test_local_variable);
    mu_run_test(test_variable_error);
    mu_run_test(test_scoping);
    mu_run_test(test_scoping_error);
    mu_run_test(test_stack);
    mu_run_test(test_stack_error);
    mu_run_test(test_destroy);

    return NULL;
}
Пример #8
0
char *all_tests() {
    mu_suite_start();

    mu_run_test(test_create);
    mu_run_test(test_new);
    mu_run_test(test_set);
    mu_run_test(test_get);
    mu_run_test(test_remove);
    mu_run_test(test_expand_contract);
    mu_run_test(test_push_pop);
    mu_run_test(test_destroy);
    mu_run_test(test_copy);

    return NULL;
}
Пример #9
0
void test_rnn_runner (void)
{
    struct test_rnn_runner_data t_data[4];

    init_genrand(391919L);

    mu_run_test(test_new_rnn_runner);

    mu_run_test_with_args(test_init_rnn_runner, t_data, 1, 10, 1, 1,
            STANDARD_TYPE, 2, (int[]){50,100});
Пример #10
0
char *test_random (void)
{
	mu_run_test (test_bitcount);
	test_wordcount (2);
	test_wordcount (3);
	test_wordcount (4);
	test_wordcount (5);
	
	return 0;
}
Пример #11
0
char* all_tests()
{
  mu_suite_start();
  
  mu_run_test(test_sequential_failures);  
  
  FREE_FAILING_ALLOCS

  return NULL;
}
Пример #12
0
void *all_tests()
{
  mu_suite_start();
  mu_run_test(test_merge_sort_3);
  mu_run_test(test_merge_sort_4);
  mu_run_test(test_merge_sort_5);
  mu_run_test(test_merge_sort_6);
  mu_run_test(test_merge_sort_7);
  mu_run_test(test_merge_sort_8);
  mu_run_test(test_merge_sort_9);
  mu_run_test(test_merge_sort_10);
  mu_run_test(test_merge_sort_11);
  NL;

  return NULL;
}
Пример #13
0
char* all_tests()
{
  mu_suite_start();

  mu_run_test(empty_list_does_not_have_cycle);
  mu_run_test(test_for_list_built_from_one_element);
  mu_run_test(test_for_straight_list);
  mu_run_test(test_for_straight_list_and_cycle_at_the_end);
  mu_run_test(test_for_one_element_tied_in_loop);
  mu_run_test(test_for_circle_from_two_nodes);
  mu_run_test(test_for_circle_from_many_nodes);
  mu_run_test(test_for_small_internal_cycle);
  mu_run_test(test_for_big_internal_cycle);

  return NULL;
}
Пример #14
0
/*
char *test_distribution()
{
    int i = 0;
    int stats[3][BUCKETS] = {{0}};
    DArray *keys = DArray_create(0, NUM_KEYS);

    mu_assert(gen_keys(keys, NUM_KEYS) == 0, "Failed to generate random keys.");

    fill_distribution(stats[ALGO_FNV1A], keys, Hashmap_fnv1a_hash);
    fill_distribution(stats[ALGO_ADLER32], keys, Hashmap_adler32_hash);
    fill_distribution(stats[ALGO_DJB], keys, Hashmap_djb_hash);

    fprintf(stderr, "FNV\tA32\tDJB\n");

    for (i = 0; i < BUCKETS; i++) {
        fprintf(stderr, "%d\t%d\t%d\n",
	        stats[ALGO_FNV1A][i],
	        stats[ALGO_ADLER32][i],
	        stats[ALGO_DJB][i]);
    }

    destroy_keys(keys);

    return NULL;
}
*/
char *all_tests()
{
    mu_suite_start();

    mu_run_test(test_fnv1a);
    // mu_run_test(test_adler32);
    // mu_run_test(test_djb);
    // mu_run_test(test_distribution);

    return NULL;
}
Пример #15
0
int test_irc_core_suite(int* errors, int* success) {
	int tests_run = 0;
	int tests_passed = 0;

	printf("Begin test_irc_core suite.\n");
/* BEGIN TEST EXEC */
	mu_run_test(t_irc_user_inchannel__user_not_inchannel__returns_false);
	mu_run_test(t_irc_user_inchannel__user_in_channel__returns_true);
	
/* END TEST EXEC */
	if(tests_passed == tests_run)
		printf("End test_irc_core suite. " TGREEN "%d/%d\n\n" TRESET, tests_passed, tests_run);
	else
		printf("End test_irc_core suite. " TRED "%d/%d\n\n" TRESET, tests_passed, tests_run);


	*errors += (tests_run - tests_passed);
	*success += tests_passed;
	return tests_run;
}
Пример #16
0
int test_daemonize_suite(int *errors, int *success)
{
    int tests_run = 0;
    int tests_passed = 0;

    printf("Begin test_daemonize suite.\n");
    /* BEGIN TEST EXEC */
    mu_run_test(t_hangs_on_init);
    mu_run_test(t_no_fds_open);

    /* END TEST EXEC */
    if(tests_passed == tests_run)
        printf("End test_daemonize suite. " TGREEN "%d/%d\n\n" TRESET, tests_passed, tests_run);
    else
        printf("End test_daemonize suite. " TRED "%d/%d\n\n" TRESET, tests_passed, tests_run);

    *errors += (tests_run - tests_passed);
    *success += tests_passed;
    return tests_run;
}
Пример #17
0
// Run all tests
char *all_tests()
{
  mu_run_test(test_write_single_flotingtype);
  mu_run_test(test_write_ft_vector);
  mu_run_test(test_write_ft_dataset);
  mu_run_test(test_write_ft_arrayset);
  mu_run_test(test_init_datasetx);
  mu_run_test(test_init_vector);
  mu_run_test(test_init_dataset);
  mu_run_test(test_init_arrayset);

  return MU_FINISHED_WITHOUT_ERRORS;
}
Пример #18
0
int test_listener_suite(int* errors, int* success) {
	int tests_run = 0;
	int tests_passed = 0;

	printf("Begin test_listener suite.\n");
/* BEGIN TEST EXEC */
	mu_run_test(t_Server_close_communication__close_noconnected_socket);
	mu_run_test(t_Server_close_communication__close_connected_socket);
	mu_run_test(t_server_open_socket__opensocket);
	
/* END TEST EXEC */
	if(tests_passed == tests_run)
		printf("End test_listener suite. " TGREEN "%d/%d\n\n" TRESET, tests_passed, tests_run);
	else
		printf("End test_listener suite. " TRED "%d/%d\n\n" TRESET, tests_passed, tests_run);

	*errors += (tests_run - tests_passed);
	*success += tests_passed;
	return tests_run;
}
Пример #19
0
/*!Aqui são chamados os testes*/
static char * testes() {

    mu_run_test(test_embaralhar);
    mu_run_test(test_retiraFim);
    mu_run_test(test_retiraInicio);
    mu_run_test(test_retiraInicio_insereFim);
    mu_run_test(test_cortar);
    mu_run_test(test_insereCartaDescarte);
	mu_run_test(test_mostraDescarte);
	mu_run_test(test_retiraDescarte);

    return 0;
}
Пример #20
0
static char * all_tests() {
    mu_run_test(test_MPC01);
    mu_run_test(test_MPC02);
    mu_run_test(test_norm);
    mu_run_test(test_quad_over_lin);
    mu_run_test(test_sq_norm);
    mu_run_test(test_sum_sq);
    mu_run_test(test_feas);
    return 0;
}
Пример #21
0
int all_tests() {
	mu_run_test(test_r_io_mapsplit);
	mu_run_test(test_r_io_mapsplit2);
	mu_run_test(test_r_io_pcache);
	mu_run_test(test_r_io_desc_exchange);
	mu_run_test(test_r_io_priority);
	mu_run_test(test_r_io_priority2);
	mu_run_test(test_va_malloc_zero);
	return tests_passed != tests_run;
}
Пример #22
0
static char * all_tests() {
   mu_run_test(test_init_db);
   mu_run_test(test_store);
   mu_run_test(test_retrieve);
   mu_run_test(test_delete);
   mu_run_test(test_list);
   mu_run_test(test_stores_in_empty_spots);
   mu_run_test(test_modify);
   return 0;
}
Пример #23
0
// ================================================================
static char * all_tests() {
	mu_run_test(test_canonical_mod);
	mu_run_test(test_streq);
	mu_run_test(test_streqn);
	mu_run_test(test_starts_or_ends_with);
	mu_run_test(test_scanners);
	mu_run_test(test_paste);
	mu_run_test(test_unbackslash);
	return 0;
}
Пример #24
0
// configuration-dependent startup
static char *config_tests( void ) 
{
  // malloc our gauge field and initialise our lattice geometry
  lat = NULL ; 
  if( ( lat = allocate_lat( ) ) == NULL ) {
    fprintf( stderr , "[CONFIG-UNIT] Gauge field allocation failure\n" ) ;
    return NULL ;
  }
  init_navig( lat ) ;

  // randomly generate an SU(NC) field
  random_suNC( lat ) ;

  // allocate gauge transformed fields
  glat = NULL ; 
  if( ( glat = allocate_lat( ) ) == NULL ) {
    fprintf( stderr , "[CONFIG-UNIT] Gauge field 2 allocation failure\n" ) ;
    return NULL ;
  }
  init_navig( glat ) ;

  size_t i , mu ;
  for( i = 0 ; i < LVOLUME ; i++ ) {
    for( mu = 0 ; mu < ND ; mu++ ) {
      equiv( glat[i].O[mu] , lat[i].O[mu] ) ;
    }
  }

  // assumes gtrans works properly
  random_gtrans( glat ) ;

  // test gauge invariant stuff
  mu_run_test( av_plaquette_test ) ;
  mu_run_test( polyakov_test ) ;

  free( lat ) ;
  free( glat ) ;

  return 0 ;
}
Пример #25
0
const char*
all_tests ()
{
  mu_run_test (default_ctor);
  mu_run_test (ctor);
  mu_run_test (copy_ctor);
  mu_run_test (copy_struct);
  mu_run_test (op_assign);
  mu_run_test (op_equal);
  mu_run_test (op_plus_equal);
  mu_run_test (op_minus);

  return 0;
}
Пример #26
0
char *
run()
{
    mu_run_test(test_entry_create_file);
    mu_run_test(test_entry_create_dir);
    mu_run_test(test_entry_add_to_dir);
    mu_run_test(test_entry_add_to_dir_with_too_many_files);
    mu_run_test(test_entry_add_to_dir_recursivly);
    mu_run_test(test_entry_rw_file);
    mu_run_test(test_entry_rw_file_with_invalid_type);
    mu_run_test(test_entry_find);

    return 0;
}
Пример #27
0
int test_dictionary_suite(int *errors, int *success)
{
    int tests_run = 0;
    int tests_passed = 0;

    printf("Begin test_dictionary suite.\n");
    /* BEGIN TEST EXEC */
    mu_run_test(t_dic_lookup__existing__returns_item);
    mu_run_test(t_dic_lookup__non_existing__returns_null);
    mu_run_test(t_dic_remove__existing__removed);
    mu_run_test(t_dic_remove__non_existing__not_removed);
    mu_run_test(t_dic_add__repeated_item__not_added);
    mu_run_test(t_dic_add__new_item__added);

    /* END TEST EXEC */
    if (tests_passed == tests_run)
        printf("End test_dictionary suite. " TGREEN "%d/%d\n\n" TRESET, tests_passed, tests_run);
    else
        printf("End test_dictionary suite. " TRED "%d/%d\n\n" TRESET, tests_passed, tests_run);


    *errors += (tests_run - tests_passed);
    *success += tests_passed;
    return tests_run;
}
Пример #28
0
char *all_tests() {
    mu_suite_start();

    mu_run_test(test_create);
    mu_run_test(test_destroy);

    mu_run_test(test_integers);
    mu_run_test(test_strings);
    mu_run_test(test_arrays);
    mu_run_test(test_hashes);

    mu_run_test(test_slots);

    mu_run_test(test_special);
    mu_run_test(test_print);

    return NULL;
}
Пример #29
0
/* How to captured exit? */
static char * all_tests() {
  mu_run_test(test_unit);

  mu_run_test(test_create_initial_board_from_file);

  mu_run_test(test_create_initial_board_from_file_with_empty_lines);

  /*
  mu_run_test(test_initial_board_missing_matrix_value);
  */


  /*
  mu_run_test(test_initial_board_missing_number_of_columns);
  */

  /*
  mu_run_test(test_initial_board_missing_row);
  */

  return 0;
}
Пример #30
0
static char* all_tests() {
	mu_run_test(test_newlist);
	mu_run_test(test_insert1);
	mu_run_test(test_insert2);
	mu_run_test(test_remove1);
	mu_run_test(test_remove2);
	mu_run_test(test_remove3);
	mu_run_test(test_remove4);
	
	return 0;
}