int main(void) { int i, strict; // srand(time(NULL)); srand(0); intdim = 0; /*for (intdim=1;intdim<2;intdim++) {*/ for (strict=0;strict<2;strict++) { /* init */ pk = pk_manager_alloc(strict); ppl = ap_ppl_poly_manager_alloc(strict); for (i=0;i<AP_EXC_SIZE;i++){ pk->option.abort_if_exception[i] = true; ppl->option.abort_if_exception[i] = true; } printf("\n\ncomparing libraries:\n- %s (%s)\n- %s (%s)\nwith strict=%i int=%i\n\n", pk->library,pk->version,ppl->library,ppl->version,strict,intdim); /* run tests */ test_conv(); test_join(); test_meet(); test_join_array(); test_meet_array(); test_dimadd(); test_dimrem(); test_forget(); test_permute(); test_expand(); test_fold(); test_add_lincons(); test_add_ray(); test_box(); test_vbound(); test_lbound(); test_csat(); test_isat(); test_assign(); test_par_assign(); test_subst(); test_par_subst(); if (!strict) test_widen(); // behave differently in strict mode /* clean-up */ ap_manager_free(pk); ap_manager_free(ppl); } /*}*/ if (error_) printf("\n%i error(s)!\n",error_); else printf("\nall tests passed\n"); return 0; }
int main(int argc, char **argv) { hx509_context context; int ret = 0; ret = hx509_context_init(&context); if (ret) errx(1, "hx509_context_init failed with %d", ret); ret += test_name(context, "CN=foo,C=SE"); ret += test_name(context, "CN=foo,CN=kaka,CN=FOO,DC=ad1,C=SE"); ret += test_name(context, "1.2.3.4=foo,C=SE"); ret += test_name_fail(context, "="); ret += test_name_fail(context, "CN=foo,=foo"); ret += test_name_fail(context, "CN=foo,really-unknown-type=foo"); ret += test_expand(context, "UID=${uid},C=SE", "UID=lha,C=SE"); ret += test_expand(context, "UID=foo${uid},C=SE", "UID=foolha,C=SE"); ret += test_expand(context, "UID=${uid}bar,C=SE", "UID=lhabar,C=SE"); ret += test_expand(context, "UID=f${uid}b,C=SE", "UID=flhab,C=SE"); ret += test_expand(context, "UID=${uid}${uid},C=SE", "UID=lhalha,C=SE"); ret += test_expand(context, "UID=${uid}{uid},C=SE", "UID=lha{uid},C=SE"); ret += test_compare(context); hx509_context_free(&context); return ret; }
/** Main test */ int main( int argc, char **argv ) { setlocale( LC_ALL, "" ); srand( time( 0 ) ); program_name=L"(ignore)"; say( L"Testing low-level functionality"); say( L"Lines beginning with '(ignore):' are not errors, they are warning messages\ngenerated by the fish parser library when given broken input, and can be\nignored. All actual errors begin with 'Error:'." ); proc_init(); halloc_util_init(); event_init(); parser_init(); function_init(); builtin_init(); reader_init(); env_init(); test_util(); test_escape(); test_convert(); test_tok(); test_parser(); test_expand(); test_path(); say( L"Encountered %d errors in low-level tests", err_count ); /* Skip performance tests for now, since they seem to hang when running from inside make (?) */ // say( L"Testing performance" ); // perf_complete(); env_destroy(); reader_destroy(); parser_destroy(); function_destroy(); builtin_destroy(); wutil_destroy(); event_destroy(); proc_destroy(); halloc_util_destroy(); }
int main (int argc, char *argv[]) { /* run tests in legacy (pre-session support) mode */ setenv ("UPSTART_NO_SESSIONS", "1", 1); test_add (); test_append (); test_set (); test_lookup (); test_get (); test_getn (); test_all_valid (); test_expand (); return 0; }
void selftest(void) { // for handling "errout" if (setjmp(jbuf)) return; #if SELFTEST test_low_level(); test_multiply(); test_scan(); test_power(); test_factor_number(); test_test(); test_tensor(); test_bake(); test(__FILE__, s, sizeof (s) / sizeof (char *)); // "s" is in selftest.h test_abs(); test_adj(); test_arg(); test_besselj(); test_bessely(); test_ceiling(); test_choose(); test_circexp(); test_clock(); test_cofactor(); test_condense(); test_contract(); test_defint(); test_denominator(); test_derivative(); test_dirac(); test_erf(); test_erfc(); test_expand(); test_expcos(); test_expsin(); test_factorpoly(); test_float(); test_floor(); test_gamma(); test_gcd(); test_imag(); test_inner(); test_lcm(); test_log(); test_mag(); test_mod(); test_nroots(); test_numerator(); test_outer(); test_polar(); test_quotient(); test_rationalize(); test_real(); test_rect(); test_sgn(); test_taylor(); test_transpose(); test_zero(); test_hermite(); test_laguerre(); test_legendre(); test_binomial(); test_divisors(); test_coeff(); test_sin(); test_cos(); test_tan(); test_sinh(); test_cosh(); test_tanh(); test_arcsin(); test_arcsinh(); test_arccos(); test_arccosh(); test_arctan(); test_arctanh(); test_index(); test_isprime(); test_integral(); test_simplify(); test_roots(); test_eigen(); #endif mini_test(); logout("OK, all tests passed.\n"); }