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; }
/* ************************************************************************* Name: main ************************************************************************* */ int main (int argc, char * argv[]) { /* test_altivec_feature will exit if the processor */ /* can not do altivec */ test_altivec_feature(); /* test the permute feature */ test_permute(); return(0); }
void test() { test_permute_pc1(); test_permute_pc2(); test_permute(); test_rotate_half_key(); test_shift_subkeys(); test_generate_key_schedule(); test_initial_permutation(); test_permute_e(); test_sbox_transform(); test_block_encode(); test_block_decode(); printf("All tests passed.\n"); }