int main (int argc, char ** argv) { if (argc == 1) standard_tests (); /* If that's not the case, parse options */ mps_algorithm alg = MPS_ALGORITHM_STANDARD_MPSOLVE; mps_opt * opt = NULL; while (mps_getopts (&opt, &argc, &argv, "a::d")) { switch (opt->optchar) { case 'a': if (opt->optvalue) { if (*opt->optvalue == 'g') { /* fprintf (stderr, "SECSOLVE -g mode\n"); */ alg = MPS_ALGORITHM_SECULAR_GA; } if (*opt->optvalue == 'u') { /* fprintf (stderr, "UNISOLVE mode\n"); */ alg = MPS_ALGORITHM_STANDARD_MPSOLVE; } } break; case 'd': debug = true; default: break; } } if (argc == 3) { return (test_mpsolve (argv[1], argv[2], alg) != true); } return EXIT_SUCCESS; }
int main(int argc, char **argv) { int errcount = 0; applyby = applybypointer; readargs(argc,argv); if( runstandardtests) { errcount += standard_tests(); } { if(filetest1) { errcount += applyby(filetest1,filetest1name, g_hideactions,0,g_showallactions); } if(filetest2) { errcount += applyby(filetest2,filetest2name, g_hideactions,0,g_showallactions); } if(filetest3) { errcount += applyby(filetest3,filetest3name, g_hideactions,0,g_showallactions); } if(filetest4) { errcount += applyby(filetest4,filetest4name, g_hideactions,0,g_showallactions); } } free(filetest1); free(filetest2); free(filetest3); free(filetest4); if(errcount) { printf("FAIL tsearch test.\n"); exit(1); } printf("PASS tsearch test.\n"); exit(0); }