mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[poincare/test/function_solver] Run solver tests with negative steps
This commit is contained in:
committed by
EmilieNumworks
parent
0a6af26162
commit
d727fb4cf8
@@ -71,12 +71,26 @@ QUIZ_CASE(poincare_function_extremum) {
|
||||
Coordinate2D<double>(NAN, NAN)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Maximum, numberOfMaxima, maxima, "cos(a)", nullptr, "a", -1.0, 0.1, 500.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMaxima = 3;
|
||||
Coordinate2D<double> maxima[numberOfMaxima] = {
|
||||
Coordinate2D<double>(360.0, 1.0),
|
||||
Coordinate2D<double>(0.0, 1.0),
|
||||
Coordinate2D<double>(NAN, NAN)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Maximum, numberOfMaxima, maxima, "cos(a)", nullptr, "a", 500.0, -0.1, -1.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMinima = 1;
|
||||
Coordinate2D<double> minima[numberOfMinima] = {
|
||||
Coordinate2D<double>(180.0, -1.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Minimum, numberOfMinima, minima, "cos(a)", nullptr, "a", 0.0, 0.1, 300.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMinima = 1;
|
||||
Coordinate2D<double> minima[numberOfMinima] = {
|
||||
Coordinate2D<double>(180.0, -1.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Minimum, numberOfMinima, minima, "cos(a)", nullptr, "a", 300.0, -0.1, 0.0);
|
||||
}
|
||||
}
|
||||
{
|
||||
{
|
||||
@@ -85,12 +99,24 @@ QUIZ_CASE(poincare_function_extremum) {
|
||||
Coordinate2D<double>(NAN, NAN)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Maximum, numberOfMaxima, maxima, "a^2", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMaxima = 1;
|
||||
Coordinate2D<double> maxima[numberOfMaxima] = {
|
||||
Coordinate2D<double>(NAN, NAN)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Maximum, numberOfMaxima, maxima, "a^2", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMinima = 1;
|
||||
Coordinate2D<double> minima[numberOfMinima] = {
|
||||
Coordinate2D<double>(0.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Minimum, numberOfMinima, minima, "a^2", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMinima = 1;
|
||||
Coordinate2D<double> minima[numberOfMinima] = {
|
||||
Coordinate2D<double>(0.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Minimum, numberOfMinima, minima, "a^2", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
}
|
||||
{
|
||||
{
|
||||
@@ -99,12 +125,24 @@ QUIZ_CASE(poincare_function_extremum) {
|
||||
Coordinate2D<double>(NAN, 3.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Maximum, numberOfMaxima, maxima, "3", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMaxima = 1;
|
||||
Coordinate2D<double> maxima[numberOfMaxima] = {
|
||||
Coordinate2D<double>(NAN, 3.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Maximum, numberOfMaxima, maxima, "3", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMinima = 1;
|
||||
Coordinate2D<double> minima[numberOfMinima] = {
|
||||
Coordinate2D<double>(NAN, 3.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Minimum, numberOfMinima, minima, "3", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMinima = 1;
|
||||
Coordinate2D<double> minima[numberOfMinima] = {
|
||||
Coordinate2D<double>(NAN, 3.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Minimum, numberOfMinima, minima, "3", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
}
|
||||
{
|
||||
{
|
||||
@@ -113,12 +151,24 @@ QUIZ_CASE(poincare_function_extremum) {
|
||||
Coordinate2D<double>(NAN, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Maximum, numberOfMaxima, maxima, "0", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMaxima = 1;
|
||||
Coordinate2D<double> maxima[numberOfMaxima] = {
|
||||
Coordinate2D<double>(NAN, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Maximum, numberOfMaxima, maxima, "0", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMinima = 1;
|
||||
Coordinate2D<double> minima[numberOfMinima] = {
|
||||
Coordinate2D<double>(NAN, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Minimum, numberOfMinima, minima, "0", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfMinima = 1;
|
||||
Coordinate2D<double> minima[numberOfMinima] = {
|
||||
Coordinate2D<double>(NAN, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Minimum, numberOfMinima, minima, "0", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,12 +181,26 @@ QUIZ_CASE(poincare_function_root) {
|
||||
Coordinate2D<double>(450.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "cos(a)", nullptr, "a", 0.0, 0.1, 500.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 3;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
Coordinate2D<double>(450.0, 0.0),
|
||||
Coordinate2D<double>(270.0, 0.0),
|
||||
Coordinate2D<double>(90.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "cos(a)", nullptr, "a", 500.0, -0.1, 0.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 1;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
Coordinate2D<double>(0.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "a^2", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 1;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
Coordinate2D<double>(0.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "a^2", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 2;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
@@ -144,18 +208,37 @@ QUIZ_CASE(poincare_function_root) {
|
||||
Coordinate2D<double>(2.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "a^2-4", nullptr, "a", -5.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 2;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
Coordinate2D<double>(2.0, 0.0),
|
||||
Coordinate2D<double>(-2.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "a^2-4", nullptr, "a", 100.0, -0.1, -5.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 1;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
Coordinate2D<double>(NAN, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "3", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 1;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
Coordinate2D<double>(NAN, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "3", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 1;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
Coordinate2D<double>(-0.9, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "0", nullptr, "a", -1.0, 0.1, 100.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfRoots = 1;
|
||||
Coordinate2D<double> roots[numberOfRoots] = {
|
||||
Coordinate2D<double>(99.8, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Root, numberOfRoots, roots, "0", nullptr, "a", 100.0, -0.1, -1.0);
|
||||
}
|
||||
}
|
||||
|
||||
QUIZ_CASE(poincare_function_intersection) {
|
||||
@@ -165,6 +248,12 @@ QUIZ_CASE(poincare_function_intersection) {
|
||||
Coordinate2D<double>(NAN, NAN)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Intersection, numberOfIntersections, intersections, "cos(a)", "2", "a", -1.0, 0.1, 500.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfIntersections = 1;
|
||||
Coordinate2D<double> intersections[numberOfIntersections] = {
|
||||
Coordinate2D<double>(NAN, NAN)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Intersection, numberOfIntersections, intersections, "cos(a)", "2", "a", 500.0, -0.1, -1.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfIntersections = 2;
|
||||
Coordinate2D<double> intersections[numberOfIntersections] = {
|
||||
@@ -172,6 +261,13 @@ QUIZ_CASE(poincare_function_intersection) {
|
||||
Coordinate2D<double>(360.0, 1.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Intersection, numberOfIntersections, intersections, "cos(a)", "1", "a", -1.0, 0.1, 500.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfIntersections = 2;
|
||||
Coordinate2D<double> intersections[numberOfIntersections] = {
|
||||
Coordinate2D<double>(360.0, 1.0),
|
||||
Coordinate2D<double>(0.0, 1.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Intersection, numberOfIntersections, intersections, "cos(a)", "1", "a", 500.0, -0.1, -1.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfIntersections = 3;
|
||||
Coordinate2D<double> intersections[numberOfIntersections] = {
|
||||
@@ -180,4 +276,12 @@ QUIZ_CASE(poincare_function_intersection) {
|
||||
Coordinate2D<double>(450.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Intersection, numberOfIntersections, intersections, "cos(a)", "0", "a", -1.0, 0.1, 500.0);
|
||||
}
|
||||
{
|
||||
constexpr int numberOfIntersections = 3;
|
||||
Coordinate2D<double> intersections[numberOfIntersections] = {
|
||||
Coordinate2D<double>(450.0, 0.0),
|
||||
Coordinate2D<double>(270.0, 0.0),
|
||||
Coordinate2D<double>(90.0, 0.0)};
|
||||
assert_points_of_interest_are(PointOfInterestType::Intersection, numberOfIntersections, intersections, "cos(a)", "0", "a", 500.0, -0.1, -1.0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user