##// END OF EJS Templates
Completes DataSeries::purge() and DataSeries::xAxisRange() tests
Alexandre Leroux -
r796:732e5c633f67
parent child
Show More
@@ -335,6 +335,9 void TestDataSeries::testPurgeScalar_data()
335 {100., 200., 300., 400., 500.})
335 {100., 200., 300., 400., 500.})
336 << 2. << 4. << DataContainer{2., 3., 4.}
336 << 2. << 4. << DataContainer{2., 3., 4.}
337 << std::vector<DataContainer>{{200., 300., 400.}};
337 << std::vector<DataContainer>{{200., 300., 400.}};
338 QTest::newRow("purgeScalar1 (min/max swap)")
339 << createScalarSeries({1., 2., 3., 4., 5.}, {100., 200., 300., 400., 500.}) << 4. << 2.
340 << DataContainer{2., 3., 4.} << std::vector<DataContainer>{{200., 300., 400.}};
338 QTest::newRow("purgeScalar2") << createScalarSeries({1., 2., 3., 4., 5.},
341 QTest::newRow("purgeScalar2") << createScalarSeries({1., 2., 3., 4., 5.},
339 {100., 200., 300., 400., 500.})
342 {100., 200., 300., 400., 500.})
340 << 0. << 2.5 << DataContainer{1., 2.}
343 << 0. << 2.5 << DataContainer{1., 2.}
@@ -517,10 +520,13 void TestDataSeries::testXAxisRange_data()
517 // Test cases //
520 // Test cases //
518 // ////////// //
521 // ////////// //
519
522
520 QTest::newRow("xAxisRange1") << createScalarSeries({1., 2., 3., 4., 5.},
523 QTest::newRow("xAxisRange") << createScalarSeries({1., 2., 3., 4., 5.},
521 {100., 200., 300., 400., 500.})
524 {100., 200., 300., 400., 500.})
522 << -1. << 3.2 << DataContainer{1., 2., 3.}
525 << -1. << 3.2 << DataContainer{1., 2., 3.}
523 << DataContainer{100., 200., 300.};
526 << DataContainer{100., 200., 300.};
527 QTest::newRow("xAxisRange1 (min/max swap)")
528 << createScalarSeries({1., 2., 3., 4., 5.}, {100., 200., 300., 400., 500.}) << 3.2 << -1.
529 << DataContainer{1., 2., 3.} << DataContainer{100., 200., 300.};
524 QTest::newRow("xAxisRange2") << createScalarSeries({1., 2., 3., 4., 5.},
530 QTest::newRow("xAxisRange2") << createScalarSeries({1., 2., 3., 4., 5.},
525 {100., 200., 300., 400., 500.})
531 {100., 200., 300., 400., 500.})
526 << 1. << 4. << DataContainer{1., 2., 3., 4.}
532 << 1. << 4. << DataContainer{1., 2., 3., 4.}
@@ -581,8 +587,8 void TestDataSeries::testValuesBoundsScalar_data()
581 QTest::newRow("scalarBounds4")
587 QTest::newRow("scalarBounds4")
582 << createScalarSeries({1., 2., 3., 4., 5.}, {100., 200., 300., 400., 500.}) << 5.1 << 6.
588 << createScalarSeries({1., 2., 3., 4., 5.}, {100., 200., 300., 400., 500.}) << 5.1 << 6.
583 << false << nan << nan;
589 << false << nan << nan;
584 QTest::newRow("scalarBounds5") << createScalarSeries({1.}, {100.}) << 0. << 2. << true << 100.
590 QTest::newRow("scalarBounds5")
585 << 100.;
591 << createScalarSeries({1.}, {100.}) << 0. << 2. << true << 100. << 100.;
586 QTest::newRow("scalarBounds6") << createScalarSeries({}, {}) << 0. << 2. << false << nan << nan;
592 QTest::newRow("scalarBounds6") << createScalarSeries({}, {}) << 0. << 2. << false << nan << nan;
587
593
588 // Tests with NaN values: NaN values are not included in min/max search
594 // Tests with NaN values: NaN values are not included in min/max search
General Comments 0
You need to be logged in to leave comments. Login now