/* check expression model */ rc testExpr (void) { RUN_TEST(testAttributeReference(), "test attribute references"); RUN_TEST(testFunctionCall(), "test function call nodes"); RUN_TEST(testConstant(), "test constant nodes"); RUN_TEST(testOperator(), "test operator nodes"); RUN_TEST(testExpressionToSQL(), "test code that translates an expression tree into SQL code"); return PASS; }
void testResult(long int result ,enum operator_e operator, long int value){ if (!testOperator(result,operator,value)){ printf("Fatal Error:\n"); printf(" testResult(result = %ld,expected = %ld)\n",result,value); printf(" erro: %s \n",getError()); exit(1); } else { if (errno){ errno = 0; } } }