From bc2eba1726b688fa3548cae1df4eeb2af47c2378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 3 Sep 2019 10:09:36 +0200 Subject: [PATCH] [tests] Fix tests (use new methods) --- apps/sequence/test/sequence.cpp | 2 +- poincare/test/function_solver.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/sequence/test/sequence.cpp b/apps/sequence/test/sequence.cpp index afeab9b76..be31c5681 100644 --- a/apps/sequence/test/sequence.cpp +++ b/apps/sequence/test/sequence.cpp @@ -40,7 +40,7 @@ void check_sequences_defined_by(double result[MaxNumberOfSequences][10], Sequenc for (int j = 0; j < 10; j++) { for (int i = 0; i < MaxNumberOfSequences; i++) { if (seqs[i]->isDefined()) { - double un = seqs[i]->evaluateAtAbscissa((double)j, &sequenceContext); + double un = seqs[i]->evaluateXYAtParameter((double)j, &sequenceContext).x2(); quiz_assert((std::isnan(un) && std::isnan(result[i][j])) || (un == result[i][j])); } } diff --git a/poincare/test/function_solver.cpp b/poincare/test/function_solver.cpp index b46f43b2d..e95d77b30 100644 --- a/poincare/test/function_solver.cpp +++ b/poincare/test/function_solver.cpp @@ -45,10 +45,10 @@ void assert_next_extrema_are( } else if (extremumType == ExtremumType::Root) { nextExtrema = Coordinate2D(e.nextRoot(symbol, currentStart, step, max, context, complexFormat, angleUnit), 0.0 ); } - currentStart = nextExtrema.x() + step; + currentStart = nextExtrema.x1() + step; quiz_assert_log_if_failure( - (doubles_are_approximately_equal(extrema[i].x(), nextExtrema.x())) - && (doubles_are_approximately_equal(extrema[i].y(), nextExtrema.y())), + (doubles_are_approximately_equal(extrema[i].x1(), nextExtrema.x1())) + && (doubles_are_approximately_equal(extrema[i].x2(), nextExtrema.x2())), e); } } @@ -195,10 +195,10 @@ void assert_next_intersections_are( for (int i = 0; i < numberOfIntersections; i++) { quiz_assert_log_if_failure(!std::isnan(currentStart), e); Coordinate2D nextIntersection = e.nextIntersection(symbol, currentStart, step, max, context, complexFormat, angleUnit, otherExpression); - currentStart = nextIntersection.x() + step; + currentStart = nextIntersection.x1() + step; quiz_assert_log_if_failure( - (doubles_are_approximately_equal(intersections[i].x(), nextIntersection.x())) - && (doubles_are_approximately_equal(intersections[i].y(), nextIntersection.y())), + (doubles_are_approximately_equal(intersections[i].x1(), nextIntersection.x1())) + && (doubles_are_approximately_equal(intersections[i].x2(), nextIntersection.x2())), e); } }