Fix broken tests.
This commit is contained in:
parent
b845969fff
commit
f5a7e85aae
|
@ -32,7 +32,9 @@
|
||||||
#include "../vgeometry/vabstractcurve.h"
|
#include "../vgeometry/vabstractcurve.h"
|
||||||
#include "../vgeometry/varc.h"
|
#include "../vgeometry/varc.h"
|
||||||
#include "../vlayout/vrawsapoint.h"
|
#include "../vlayout/vrawsapoint.h"
|
||||||
|
#include "../vmisc/testpath.h" // do not remove
|
||||||
#include "../vmisc/vabstractvalapplication.h"
|
#include "../vmisc/vabstractvalapplication.h"
|
||||||
|
#include "../vpatterndb/testpassmark.h" // do not remove
|
||||||
#include "vgeometrydef.h"
|
#include "vgeometrydef.h"
|
||||||
#include "vpassmark.h"
|
#include "vpassmark.h"
|
||||||
|
|
||||||
|
@ -674,9 +676,10 @@ auto VPassmark::SAPassmark(const QVector<QPointF> &seamAllowance, const QVector<
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// DumpVector(seamAllowance, QStringLiteral("seamAllowance.json.XXXXXX")); // Uncomment for dumping test data
|
// DumpVector(seamAllowance, QStringLiteral("seamAllowance.json.XXXXXX")); // Uncomment for dumping test data
|
||||||
// DumpVector(seamAllowance, QStringLiteral("rotatedSeamAllowance.json.XXXXXX")); // Uncomment for dumping test data
|
// DumpVector(rotatedSeamAllowance,
|
||||||
// DumpPassmarkData(m_data, QStringLiteral("passmarkData.json.XXXXXX")); // Uncomment for dumping test data
|
// QStringLiteral("rotatedSeamAllowance.json.XXXXXX")); // Uncomment for dumping test data
|
||||||
|
// DumpPassmarkData(m_data, QStringLiteral("passmarkData.json.XXXXXX")); // Uncomment for dumping test data
|
||||||
|
|
||||||
QVector<QLineF> lines = SAPassmarkBaseLine(seamAllowance, rotatedSeamAllowance, side);
|
QVector<QLineF> lines = SAPassmarkBaseLine(seamAllowance, rotatedSeamAllowance, side);
|
||||||
if (lines.isEmpty())
|
if (lines.isEmpty())
|
||||||
|
@ -685,7 +688,7 @@ auto VPassmark::SAPassmark(const QVector<QPointF> &seamAllowance, const QVector<
|
||||||
}
|
}
|
||||||
|
|
||||||
lines = CreatePassmarkLines(lines, seamAllowance, side);
|
lines = CreatePassmarkLines(lines, seamAllowance, side);
|
||||||
// DumpPassmarkShape(lines, QStringLiteral("passmarkShape.json.XXXXXX")); // Uncomment for dumping test data
|
// DumpPassmarkShape(lines, QStringLiteral("passmarkShape.json.XXXXXX")); // Uncomment for dumping test data
|
||||||
return lines;
|
return lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ auto main(int argc, char **argv) -> int
|
||||||
QResource::registerResource(QCoreApplication::applicationDirPath() + QStringLiteral("/test_data.rcc"));
|
QResource::registerResource(QCoreApplication::applicationDirPath() + QStringLiteral("/test_data.rcc"));
|
||||||
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
auto ASSERT_TEST = [&status, argc, argv](QObject* obj)
|
auto ASSERT_TEST = [&status, argc, argv](QObject *obj)
|
||||||
{
|
{
|
||||||
status |= QTest::qExec(obj, argc, argv);
|
status |= QTest::qExec(obj, argc, argv);
|
||||||
delete obj;
|
delete obj;
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"globalPassmarkLength": 0,
|
"globalPassmarkLength": 0,
|
||||||
|
"globalPassmarkWidth": 0,
|
||||||
"id": 373,
|
"id": 373,
|
||||||
"isMainPathNode": true,
|
"isMainPathNode": true,
|
||||||
"isShowSecondPassmark": true,
|
"isShowSecondPassmark": true,
|
||||||
"nextSAPoint": {
|
"nextSAPoint": {
|
||||||
|
"passmarkClockwiseOpening": false,
|
||||||
"saAfter": 37.795275590551185,
|
"saAfter": 37.795275590551185,
|
||||||
"saBefore": 0,
|
"saBefore": 0,
|
||||||
"turnPoint": true,
|
"turnPoint": true,
|
||||||
|
@ -17,6 +19,7 @@
|
||||||
"passmarkIndex": 0,
|
"passmarkIndex": 0,
|
||||||
"passmarkLineType": 3,
|
"passmarkLineType": 3,
|
||||||
"passmarkSAPoint": {
|
"passmarkSAPoint": {
|
||||||
|
"passmarkClockwiseOpening": false,
|
||||||
"saAfter": 0,
|
"saAfter": 0,
|
||||||
"saBefore": 37.795275590551185,
|
"saBefore": 37.795275590551185,
|
||||||
"turnPoint": true,
|
"turnPoint": true,
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
"previousSAPoint": {
|
"previousSAPoint": {
|
||||||
"angle": 6,
|
"angle": 6,
|
||||||
"curvePoint": true,
|
"curvePoint": true,
|
||||||
|
"passmarkClockwiseOpening": false,
|
||||||
"saAfter": 37.795275590551185,
|
"saAfter": 37.795275590551185,
|
||||||
"saBefore": 37.795275590551185,
|
"saBefore": 37.795275590551185,
|
||||||
"type": "VSAPoint",
|
"type": "VSAPoint",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
{
|
{
|
||||||
"p1": {
|
"p1": {
|
||||||
"type": "QPointF",
|
"type": "QPointF",
|
||||||
"x": -824.2011460276914,
|
"x": -821.3739639415661,
|
||||||
"y": 346.4832618163752
|
"y": 352.98150326249686
|
||||||
},
|
},
|
||||||
"p2": {
|
"p2": {
|
||||||
"type": "QPointF",
|
"type": "QPointF",
|
||||||
|
@ -25,6 +25,19 @@
|
||||||
"y": 359.4797447086185
|
"y": 359.4797447086185
|
||||||
},
|
},
|
||||||
"type": "QLineF"
|
"type": "QLineF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"p1": {
|
||||||
|
"type": "QPointF",
|
||||||
|
"x": -818.5467818554408,
|
||||||
|
"y": 359.4797447086185
|
||||||
|
},
|
||||||
|
"p2": {
|
||||||
|
"type": "QPointF",
|
||||||
|
"x": -824.2011460276914,
|
||||||
|
"y": 346.4832618163752
|
||||||
|
},
|
||||||
|
"type": "QLineF"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"globalPassmarkLength": 0,
|
"globalPassmarkLength": 0,
|
||||||
|
"globalPassmarkWidth": 0,
|
||||||
"id": 435,
|
"id": 435,
|
||||||
"isMainPathNode": true,
|
"isMainPathNode": true,
|
||||||
"isShowSecondPassmark": true,
|
"isShowSecondPassmark": true,
|
||||||
"nextSAPoint": {
|
"nextSAPoint": {
|
||||||
|
"passmarkClockwiseOpening": false,
|
||||||
"saAfter": 37.795275590551185,
|
"saAfter": 37.795275590551185,
|
||||||
"saBefore": 37.795275590551185,
|
"saBefore": 37.795275590551185,
|
||||||
"turnPoint": true,
|
"turnPoint": true,
|
||||||
|
@ -17,6 +19,7 @@
|
||||||
"passmarkIndex": 0,
|
"passmarkIndex": 0,
|
||||||
"passmarkLineType": 3,
|
"passmarkLineType": 3,
|
||||||
"passmarkSAPoint": {
|
"passmarkSAPoint": {
|
||||||
|
"passmarkClockwiseOpening": false,
|
||||||
"saAfter": 37.795275590551185,
|
"saAfter": 37.795275590551185,
|
||||||
"saBefore": 37.795275590551185,
|
"saBefore": 37.795275590551185,
|
||||||
"turnPoint": true,
|
"turnPoint": true,
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
"previousSAPoint": {
|
"previousSAPoint": {
|
||||||
"angle": 6,
|
"angle": 6,
|
||||||
"curvePoint": true,
|
"curvePoint": true,
|
||||||
|
"passmarkClockwiseOpening": false,
|
||||||
"saAfter": 37.795275590551185,
|
"saAfter": 37.795275590551185,
|
||||||
"saBefore": 37.795275590551185,
|
"saBefore": 37.795275590551185,
|
||||||
"type": "VSAPoint",
|
"type": "VSAPoint",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
{
|
{
|
||||||
"p1": {
|
"p1": {
|
||||||
"type": "QPointF",
|
"type": "QPointF",
|
||||||
"x": -838.454269371801,
|
"x": -835.4255113454269,
|
||||||
"y": 334.6971977222692
|
"y": 341.1039695504113
|
||||||
},
|
},
|
||||||
"p2": {
|
"p2": {
|
||||||
"type": "QPointF",
|
"type": "QPointF",
|
||||||
|
@ -25,6 +25,19 @@
|
||||||
"y": 347.5107413785534
|
"y": 347.5107413785534
|
||||||
},
|
},
|
||||||
"type": "QLineF"
|
"type": "QLineF"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"p1": {
|
||||||
|
"type": "QPointF",
|
||||||
|
"x": -832.3967533190528,
|
||||||
|
"y": 347.5107413785534
|
||||||
|
},
|
||||||
|
"p2": {
|
||||||
|
"type": "QPointF",
|
||||||
|
"x": -838.454269371801,
|
||||||
|
"y": 334.6971977222692
|
||||||
|
},
|
||||||
|
"type": "QLineF"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user