MathTestExec.cxx 760 Bytes
Newer Older
Andy Cedilnik's avatar
Andy Cedilnik committed
1 2
#include <stdio.h>

3 4 5 6 7 8 9
#define TEST_EXPRESSION(x, y)                                                 \
  if ((x) != (y)) {                                                           \
    printf("Problem with EXPR: Expression: \"%s\" in C returns %d while in "  \
           "CMake returns: %d\n",                                             \
           #x, (x), (y));                                                     \
    res++;                                                                    \
  }
Andy Cedilnik's avatar
Andy Cedilnik committed
10 11 12

int main(int argc, char* argv[])
{
13
  if (argc > 1) {
Andy Cedilnik's avatar
Andy Cedilnik committed
14 15
    printf("Usage: %s\n", argv[0]);
    return 1;
16
  }
Andy Cedilnik's avatar
Andy Cedilnik committed
17 18
  int res = 0;
#include "MathTestTests.h"
19
  if (res != 0) {
Andy Cedilnik's avatar
Andy Cedilnik committed
20 21
    printf("%s: %d math tests failed\n", argv[0], res);
    return 1;
22
  }
Andy Cedilnik's avatar
Andy Cedilnik committed
23 24
  return 0;
}