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

25 years ago
  1. #include <stdlib.h>
  2. #include <cl_io.h>
  3. #include <cl_real.h>
  4. extern int test_integer();
  5. extern int test_rational();
  6. extern int test_sfloat();
  7. extern int test_ffloat();
  8. extern int test_dfloat();
  9. extern int test_lfloat();
  10. int test_elementary (void)
  11. {
  12. int error = 0;
  13. error |= test_integer();
  14. error |= test_rational();
  15. error |= test_sfloat();
  16. error |= test_ffloat();
  17. error |= test_dfloat();
  18. error |= test_lfloat();
  19. return error;
  20. }
  21. extern int test_gcd (void);
  22. extern int test_xgcd (void);
  23. extern int test_sqrtp (void);
  24. int test_all (void)
  25. {
  26. int error = 0;
  27. error |= test_elementary();
  28. error |= test_gcd();
  29. error |= test_xgcd();
  30. error |= test_sqrtp();
  31. return error;
  32. }
  33. int main ()
  34. {
  35. if (!test_all()) {
  36. fprint (cl_stdout, "Tests passed.\n");
  37. exit(0);
  38. } else {
  39. fprint (cl_stdout, "Tests failed.\n");
  40. exit(1);
  41. }
  42. }