8 #include <QtTest/QtTest> 25 void TestSplineDrawer::cleanupTestCase ()
30 void TestSplineDrawer::initTestCase ()
37 const bool NO_RESET =
false;
39 const bool NO_EXPORT_IMAGE_ONLY =
false;
40 const QString NO_EXPORT_IMAGE_EXTENSION;
57 NO_EXPORT_IMAGE_EXTENSION,
63 bool TestSplineDrawer::testMultiValuedGeneric (
const vector<SplinePair> &xy,
64 const vector<bool> &isMultiValued)
const 79 trans.setModelCoords (modelCoords,
82 QTransform matrixScreen (198.5 , 627.562, 55.625 ,
83 562.562, 562.562, 155.562,
85 QTransform matrixGraph (0.001, 1.0, 0.0001,
88 trans.updateTransformFromMatrices (matrixScreen,
92 vector<SplinePair>::const_iterator itr;
93 for (itr = xy.begin(); itr != xy.end(); itr++) {
94 t.push_back (counter++);
101 for (
unsigned int segment = 0; segment < isMultiValued.size(); segment++) {
102 if (isMultiValued [segment] != sd.segmentIsMultiValued (s,
112 void TestSplineDrawer::testMultiValuedLeadingOverlap ()
114 vector<SplinePair> xy;
115 vector<bool> isMultiValued;
117 xy.push_back (
SplinePair (198.388, 426.423)); isMultiValued.push_back (
true);
118 xy.push_back (
SplinePair (198.531, 399.463)); isMultiValued.push_back (
false);
119 xy.push_back (
SplinePair (384.589, 263.384)); isMultiValued.push_back (
true);
120 xy.push_back (
SplinePair (409.525, 250.684)); isMultiValued.push_back (
true);
121 xy.push_back (
SplinePair (441.360, 535.685)); isMultiValued.push_back (
false);
122 xy.push_back (
SplinePair (484.557, 358.601)); isMultiValued.push_back (
false);
123 xy.push_back (
SplinePair (495.663, 454.633)); isMultiValued.push_back (
false);
124 xy.push_back (
SplinePair (527.411, 182.426)); isMultiValued.push_back (
false);
125 xy.push_back (
SplinePair (633.561, 155.353)); isMultiValued.push_back (
false);
128 bool success = testMultiValuedGeneric (xy,
134 void TestSplineDrawer::testMultiValuedTrailingOverlap ()
136 vector<SplinePair> xy;
137 vector<bool> isMultiValued;
140 double maxPlusMin = 756.603 + 198.388;
141 xy.push_back (
SplinePair (maxPlusMin - 756.603, 358.646)); isMultiValued.push_back (
false);
142 xy.push_back (
SplinePair (maxPlusMin - 633.561, 155.353)); isMultiValued.push_back (
false);
143 xy.push_back (
SplinePair (maxPlusMin - 527.411, 182.426)); isMultiValued.push_back (
false);
144 xy.push_back (
SplinePair (maxPlusMin - 495.663, 454.633)); isMultiValued.push_back (
false);
145 xy.push_back (
SplinePair (maxPlusMin - 484.557, 358.601)); isMultiValued.push_back (
false);
146 xy.push_back (
SplinePair (maxPlusMin - 441.360, 535.685)); isMultiValued.push_back (
true);
147 xy.push_back (
SplinePair (maxPlusMin - 409.525, 250.684)); isMultiValued.push_back (
true);
148 xy.push_back (
SplinePair (maxPlusMin - 384.589, 263.384)); isMultiValued.push_back (
false);
149 xy.push_back (
SplinePair (maxPlusMin - 198.531, 399.463)); isMultiValued.push_back (
true);
150 xy.push_back (
SplinePair (maxPlusMin - 198.388, 426.423));
152 bool success = testMultiValuedGeneric (xy,
Model for DlgSettingsGeneral and CmdSettingsGeneral.
Cubic interpolation given independent and dependent value vectors.
const bool NO_GNUPLOT_LOG_FILES
void setCoordScaleYRadius(CoordScale coordScale)
Set method for linear/log scale on y/radius.
const bool NO_REGRESSION_IMPORT
void initializeLogging(const QString &name, const QString &filename, bool isDebug)
const QStringList NO_LOAD_STARTUP_FILES
Model for DlgSettingsMainWindow.
const QString NO_REGRESSION_OPEN_FILE
const bool NO_EXPORT_ONLY
Model for DlgSettingsCoords and CmdSettingsCoords.
const QStringList NO_COMMAND_LINE
const bool NO_DROP_REGRESSION
TestSplineDrawer(QObject *parent=0)
Single constructor.
const QString NO_ERROR_REPORT_LOG_FILE
Unit test of spline drawer, which classifies single- versus multi-valued data.
This class takes the output from Spline and uses that to draw the curve in the graphics window,...
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Single X/Y pair for cubic spline interpolation initialization and calculations.
void setCoordScaleXTheta(CoordScale coordScale)
Set method for linear/log scale on x/theta.