Poincare: Proper macro to enable expression debug

Change-Id: Ie1e880f5f80a5ce49424319a9af9d97bf10f2ef4
This commit is contained in:
Romain Goyet
2016-04-07 15:50:33 +02:00
parent d2a010be70
commit 07f749ff2a

View File

@@ -9,7 +9,7 @@ using namespace std;
#endif
void assert_simplifies_to(const char * input_string, const char * expected_string) {
#if DUMP_EXPRESSIONS_TO_STD_OUT
#if POINCARE_TESTS_PRINT_EXPRESSIONS
cout << "---- Simplification Run ----" << endl;
cout << input_string << " -> " << expected_string << endl;
#endif
@@ -17,21 +17,21 @@ void assert_simplifies_to(const char * input_string, const char * expected_strin
//Expression* input = new Addition(tab, 3, false);
Expression * input = Expression::parse(input_string);
assert(input != nullptr);
#if DUMP_EXPRESSIONS_TO_STD_OUT
#if POINCARE_TESTS_PRINT_EXPRESSIONS
cout << "Input = " << endl;
print_expression(input);
#endif
Expression * simplified = input->simplify();
assert(simplified != nullptr);
#if DUMP_EXPRESSIONS_TO_STD_OUT
#if POINCARE_TESTS_PRINT_EXPRESSIONS
cout << "Simplified = " << endl;
print_expression(simplified);
#endif
Expression * expected = Expression::parse(expected_string);
assert(expected != nullptr);
#if DUMP_EXPRESSIONS_TO_STD_OUT
#if POINCARE_TESTS_PRINT_EXPRESSIONS
cout << "Expected = " << endl;
print_expression(expected);
#endif