mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 20:23:06 +02:00
Refactored OctreeTests to use QtTest.
Note: unit tests currently fail, so that needs to be looked into.
This commit is contained in:
parent
dfe58a5ed4
commit
4cb1dddb89
4 changed files with 757 additions and 698 deletions
|
@ -67,7 +67,7 @@ void AABoxCubeTests::raycastInHitsXMinFace () {
|
||||||
bool intersects = box.findRayIntersection(origin, direction, distance, face);
|
bool intersects = box.findRayIntersection(origin, direction, distance, face);
|
||||||
|
|
||||||
QCOMPARE(intersects, true);
|
QCOMPARE(intersects, true);
|
||||||
QCOMPARE(distance, 0.5f);
|
QCOMPARE(distance, 0.25f);
|
||||||
QCOMPARE(face, MIN_X_FACE);
|
QCOMPARE(face, MIN_X_FACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ private slots:
|
||||||
void raycastInHitsXMinFace ();
|
void raycastInHitsXMinFace ();
|
||||||
|
|
||||||
// TODO: Add more unit tests!
|
// TODO: Add more unit tests!
|
||||||
// (eg. no test for failed intersection or non-orthogonal ray)
|
// (do we need this? Currently no tests for no-intersection or non-orthogonal rays)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AABoxCubeTests_h
|
#endif // hifi_AABoxCubeTests_h
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -22,7 +22,14 @@ private slots:
|
||||||
void byteCountCodingTests();
|
void byteCountCodingTests();
|
||||||
void modelItemTests();
|
void modelItemTests();
|
||||||
|
|
||||||
// void runAllTests(bool verbose);
|
// TODO: Break these into separate test functions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Helper functions
|
||||||
|
inline QByteArray makeQByteArray (std::initializer_list<char> bytes) {
|
||||||
|
return QByteArray {
|
||||||
|
bytes.begin(), static_cast<int>(bytes.size() * sizeof(char))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
#endif // hifi_OctreeTests_h
|
#endif // hifi_OctreeTests_h
|
||||||
|
|
Loading…
Reference in a new issue