MathTestExec.cxx 496 B

1234567891011121314151617181920212223242526
  1. #include <stdio.h>
  2. #define TEST_EXPRESSION(x, y) \
  3. if ( (x) != (y) ) \
  4. { \
  5. printf("Problem with EXPR: Expression: \"%s\" in C returns %d while in CMake returns: %d\n", \
  6. #x, (x), (y)); \
  7. res ++; \
  8. }
  9. int main(int argc, char* argv[])
  10. {
  11. if ( argc > 1 )
  12. {
  13. printf("Usage: %s\n", argv[0]);
  14. return 1;
  15. }
  16. int res = 0;
  17. #include "MathTestTests.h"
  18. if ( res != 0 )
  19. {
  20. printf("%s: %d math tests failed\n", argv[0], res);
  21. return 1;
  22. }
  23. return 0;
  24. }