int main()
{
   conversion_test();
   to_view_test();
   equal_test();
   unequal_test();
   less_test();
   greater_test();
   less_equal_test();
   greater_equal_test();
   constructor_test();
   assignment_test();
   assign_test();
   plus_equal_test();
   append_test();
   insert_test();
   replace_test();
   find_test();
   rfind_test();
   find_first_of_test();
   find_last_of_test();
   find_first_not_of_test();
   find_last_not_of_test();
   compare_test();

   return boost::report_errors();
}
예제 #2
0
int test_main(int, char*[])
{
  target_test();
  equal_test();
  ref_equal_test();

  return 0;
}
예제 #3
0
int main()
{
  target_test();
  equal_test();
  ref_equal_test();

  return boost::report_errors();
}
예제 #4
0
int main()
{
    find_test();
    find_if_test();
    find_end_test();
    find_first_of_test();
    adjacent_find_test();
    count_test();
    count_if_test();
    distance_test();
    mismatch_test();
    equal_test();
    search_test();
    lower_bound_test();
    upper_bound_test();
    equal_range_test();
    binary_search_test();
    return boost::report_errors();
}
예제 #5
0
int main(void)
{
    bigbool obj1, obj2, obj3;
    int i, j, n;
    char *a;
    char *str;

    equal_test();

    srand(time(NULL));
    bigbool_init(&obj1);
    bigbool_init(&obj2);
    bigbool_init(&obj3);

    for(j=0;;j++)
    {
	n = rand() % 10000 + 1;
	bigbool_create(&obj1, n);
	a = (char*) malloc(n);
	str = (char*) malloc(n + 1);
	
	for(i=0; i<n; i++)
	{
	    a[i] = rand() % 2;
	    str[i] = a[i] + '0';
	    bigbool_set(&obj1, i, a[i]);
	}
	
	str[i] = '\0';
	bigbool_create_str(&obj2, str);

	for(i=0; i<n; i++)
	{
	    if(a[i] != bigbool_get(&obj1, i))
	    {
		fprintf(stderr, "Error. Bigbool incorect\n");
		return 1;
	    }
	    if(str[i] - '0' != bigbool_get(&obj2, i))
	    {
		fprintf(stderr, "Error. Create for str incorrect\n");
		return 2;
	    }
	}

	bigbool_copy(&obj3, &obj2);
	bigbool_delete(&obj1);
	bigbool_delete(&obj2);
	for(i=0; i<n; i++)
	{
	    if(a[i] != bigbool_get(&obj3, i))
	    {
		fprintf(stderr, "Error. Copy bigbool incorect\n");
		return 2;
	    }
	}
	free(a);
	free(str);
	bigbool_delete(&obj3);
	fprintf(stderr, "%d: %d\n", j,n);
    }
/*    for(;;)
    {
	for(i=0; i<obj.size_bit; i++)
	    fprintf(stderr, "%d", bigbool_get(&obj, i));
	fprintf(stderr, "\n");
	getc(stdin);
	bigbool_deikstre(&obj);
    }
    bigbool_delete(&obj);*/
    return 0;
}