Ejemplo n.º 1
0
int
main(void)
{
  gsl_rng * r = gsl_rng_alloc(gsl_rng_default);

  test_bst(gsl_bst_avl, r);
  test_bst(gsl_bst_rb, r);

  gsl_rng_free(r);

  exit (gsl_test_summary());
}
Ejemplo n.º 2
0
int main (int argc, char *argv[]) {
    bstree_t *tree;
    tree = make_tree(BALANCED, 1);
    bst_destroy(tree);
    free(tree);

    test_bst(BALANCED);
    test_bst(LEFT_HEAVY);
    test_bst(RIGHT_HEAVY);

    return unittest_has_error;
}
Ejemplo n.º 3
0
bool test_all()
{
	printf("Test Stack: %s\n",  test_stack()?"PASS":"******");
	printf("Test Queue: %s\n",  test_queue()?"PASS":"******");
	printf("Test List:  %s\n",  test_list()?"PASS":"******");
	printf("Test MinHeap: %s\n",test_minheap()?"PASS":"******");
	printf("Test MaxHeap: %s\n",test_maxheap()?"PASS":"******");
	printf("Test RedBlack: %s\n", /*test_redblack()*/false?"PASS":"******");
	printf("Test BST: %s\n", test_bst()?"PASS":"******");
	printf("Test HashTable: %s\n",test_hashtable()?"PASS":"******");
	printf("Test Tuple: %s\n",test_tuple()?"PASS":"******");
	if(DEBUG)functional_tests();
	return 1;
}