mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-06 22:53:32 +02:00
PR Fixes
This commit is contained in:
parent
a48adf5ce5
commit
7ba03418fc
7 changed files with 9 additions and 741 deletions
|
@ -134,7 +134,7 @@ if (APPLE)
|
|||
endif ()
|
||||
|
||||
# Hide automoc folders (for IDEs)
|
||||
set(AUTOGEN_TARGETS_FOLDER "hidden/generated") # Apparently this doesn't work... -.-
|
||||
set(AUTOGEN_TARGETS_FOLDER "hidden/generated")
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
test = function(name, func) {
|
||||
var test = function(name, func) {
|
||||
print("Running test: " + name);
|
||||
|
||||
var unitTest = new UnitTest(name, func);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,7 @@ inline btScalar getErrorDifference(const btVector3& a, const btVector3& b) {
|
|||
return (a - b).length();
|
||||
}
|
||||
// Matrices are compared element-wise -- if the error value for any element > epsilon, then fail
|
||||
inline btScalar getErrorDifference (const btMatrix3x3& a, const btMatrix3x3& b) {
|
||||
inline btScalar getErrorDifference(const btMatrix3x3& a, const btMatrix3x3& b) {
|
||||
btScalar maxDiff = 0;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
|
@ -48,7 +48,7 @@ inline btScalar getErrorDifference (const btMatrix3x3& a, const btMatrix3x3& b)
|
|||
//
|
||||
|
||||
// btMatrix3x3 stream printing (not advised to use this outside of the test macros, due to formatting)
|
||||
inline QTextStream& operator << (QTextStream& stream, const btMatrix3x3& matrix) {
|
||||
inline QTextStream& operator<< (QTextStream& stream, const btMatrix3x3& matrix) {
|
||||
stream << "[\n\t\t";
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
// Implements functionality in QTestExtensions.h for glm types
|
||||
|
||||
inline float getErrorDifference(const glm::vec3 & a, const glm::vec3 & b) {
|
||||
inline float getErrorDifference(const glm::vec3& a, const glm::vec3& b) {
|
||||
return glm::distance(a, b);
|
||||
}
|
||||
inline QTextStream & operator << (QTextStream & stream, const glm::vec3 & v) {
|
||||
inline QTextStream& operator<<(QTextStream& stream, const glm::vec3& v) {
|
||||
return stream << "glm::vec3 { " << v.x << ", " << v.y << ", " << v.z << " }";
|
||||
}
|
||||
|
||||
|
|
|
@ -55,23 +55,6 @@ void MeshMassPropertiesTests::testParallelAxisTheorem() {
|
|||
|
||||
btMatrix3x3 twoSmallBoxesInertia = smallBoxShiftedRight + smallBoxShiftedLeft;
|
||||
|
||||
// verify bigBox same as twoSmallBoxes
|
||||
// btScalar error;
|
||||
// for (int i = 0; i < 3; ++i) {
|
||||
// for (int j = 0; j < 3; ++j) {
|
||||
// QCOMPARE_WITH_ABS_ERROR(bitBoxInertia[i][j], twoSmallBoxesInertia[i][j], acceptableAbsoluteError);
|
||||
//// error = bitBoxInertia[i][j] - twoSmallBoxesInertia[i][j];
|
||||
//// if (fabsf(error) > acceptableAbsoluteError) {
|
||||
//// std::cout << __FILE__ << ":" << __LINE__ << " ERROR : box inertia[" << i << "][" << j << "] off by = "
|
||||
//// << error << std::endl;
|
||||
//// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// Try commenting this out to see what happens when the test fails
|
||||
// twoSmallBoxesInertia[0][2] += 10;
|
||||
|
||||
// This now does the same as the above (using the maxDiff getErrorDifference impl for two btMatrices)
|
||||
QCOMPARE_WITH_ABS_ERROR(bitBoxInertia, twoSmallBoxesInertia, acceptableAbsoluteError);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ inline float getErrorDifference (float a, float b) {
|
|||
class MovingMinMaxAvgTests : public QObject {
|
||||
|
||||
private slots:
|
||||
void testQuint64 ();
|
||||
void testInt ();
|
||||
void testFloat ();
|
||||
void testQuint64();
|
||||
void testInt();
|
||||
void testFloat();
|
||||
|
||||
private:
|
||||
quint64 randQuint64();
|
||||
|
|
Loading…
Reference in a new issue