You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

47 lines
832 B

#include <stdlib.h>
#include <cl_io.h>
#include <cl_real.h>
extern int test_integer();
extern int test_rational();
extern int test_sfloat();
extern int test_ffloat();
extern int test_dfloat();
extern int test_lfloat();
int test_elementary (void)
{
int error = 0;
error |= test_integer();
error |= test_rational();
error |= test_sfloat();
error |= test_ffloat();
error |= test_dfloat();
error |= test_lfloat();
return error;
}
extern int test_gcd (void);
extern int test_xgcd (void);
extern int test_sqrtp (void);
int test_all (void)
{
int error = 0;
error |= test_elementary();
error |= test_gcd();
error |= test_xgcd();
error |= test_sqrtp();
return error;
}
int main ()
{
if (!test_all()) {
fprint (cl_stdout, "Tests passed.\n");
exit(0);
} else {
fprint (cl_stdout, "Tests failed.\n");
exit(1);
}
}