I'm currently building a unit test suite for my application, using QTestLib
. It's generally pretty straight-forward, but I'm become stuck on how to verify 'return' arguments. For example, if I have a function:
double pointLineSegmentDistance(const QVector2D& start,
const QVector2D& end,
const QVector2D& point,
bool& withinBounds);
The function assigns withinBounds
the bounded state of the segment distance analysis. How can I make the QCOMPARE
/QVERIFY
macros analyse it's state?