Ejemplo n.º 1
0
int main(int argc, char **argv) {
    double st, en;
    int ret;
    st = get_time();

#ifdef DO_CALL_TEST0
    ret=test_curve(0);
#endif
#ifdef DO_CALL_TEST1
    ret=test_curve(1);
#endif
#ifdef DO_CALL_TEST2
    ret=test_curve(2);
#endif
#ifdef DO_CALL_TEST3
    if ( (ret=test_curve(3)==0) ) /* This curve will not converge */
	ret = -1 /* error found! ret=error value */;
    else
	ret = 0; /* expected failure to converge */
#endif
#ifdef DO_CALL_TESTM
    ret=test_multi_curves();
#endif

    en = get_time();
    printf("time %g\n", (en - st));
    return ret;
}
Ejemplo n.º 2
0
int main(int argc, char **argv) {
    double st, en;
    int ret = 0;
    st = get_time();

    if ( test_curve(0) || test_curve(1) || test_curve(2) || \
	 !test_curve(3) || /* This curve won't converge. */ \
    	 test_multi_curves() )
	ret = -1;

    en = get_time();
    printf("time %g\n", (en - st));
    return ret;
}