[poincare] Comment-out unused code

This commit is contained in:
Romain Goyet
2017-10-19 10:03:27 +02:00
committed by EmilieNumworks
parent e5010b1621
commit f34146be5e
4 changed files with 9 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
SFLAGS += -Ipoincare/include
include poincare/src/simplify/Makefile
#include poincare/src/simplify/Makefile
objs += $(addprefix poincare/src/,\
absolute_value.o\
@@ -98,13 +98,11 @@ tests += $(addprefix poincare/test/,\
fraction.cpp\
function.cpp\
helper.cpp\
identity.cpp\
integer.cpp\
matrix.cpp\
parser.cpp\
product.cpp\
power.cpp\
simplify_utils.cpp\
subtraction.cpp\
symbol.cpp\
trigo.cpp\

View File

@@ -92,6 +92,7 @@ template<typename T> T Expression::epsilon() {
return epsilon;
}
#if POINCARE_SIMPLIFY
Expression * Expression::simplify() const {
/* We make sure that the simplification is deletable.
* Indeed, we don't want an expression with some parts deletable and some not
@@ -139,6 +140,7 @@ Expression * Expression::simplify() const {
return result;
}
#endif
bool Expression::sequentialOperandsIdentity(const Expression * e) const {
/* Here we simply test all operands for identity in the order they are defined
@@ -215,6 +217,7 @@ bool Expression::isIdenticalTo(const Expression * e) const {
return this->valueEquals(e);
}
#if POINCARE_SIMPLIFY
bool Expression::isEquivalentTo(Expression * e) const {
Expression * a = this->simplify();
Expression * b = e->simplify();
@@ -223,6 +226,7 @@ bool Expression::isEquivalentTo(Expression * e) const {
delete b;
return result;
}
#endif
bool Expression::valueEquals(const Expression * e) const {
assert(this->type() == e->type());

View File

@@ -32,6 +32,7 @@ void assert_parsed_expression_type(const char * expression, Poincare::Expression
delete e;
}
#if POINCARE_SIMPLIFY
void assert_parsed_simplified_expression_type(const char * expression, Poincare::Expression::Type type) {
Expression * e = parse_expression(expression);
Expression * e2 = e->simplify();
@@ -40,6 +41,7 @@ void assert_parsed_simplified_expression_type(const char * expression, Poincare:
delete e;
delete e2;
}
#endif
template<typename T>
void assert_parsed_expression_evaluates_to(const char * expression, Complex<T> * results, int numberOfRows, int numberOfColumns, Expression::AngleUnit angleUnit) {

View File

@@ -7,6 +7,7 @@
using namespace Poincare;
QUIZ_CASE(poincare_parse_trigo) {
#if POINCARE_SIMPLIFY
assert_parsed_simplified_expression_type("sin(0)", Expression::Type::Sine);
assert_parsed_simplified_expression_type("cos(0)", Expression::Type::Cosine);
assert_parsed_simplified_expression_type("tan(0)", Expression::Type::Tangent);
@@ -19,6 +20,7 @@ QUIZ_CASE(poincare_parse_trigo) {
assert_parsed_simplified_expression_type("acosh(0)", Expression::Type::HyperbolicArcCosine);
assert_parsed_simplified_expression_type("asinh(0)", Expression::Type::HyperbolicArcSine);
assert_parsed_simplified_expression_type("atanh(0)", Expression::Type::HyperbolicArcTangent);
#endif
}
QUIZ_CASE(poincare_trigo_evaluate) {