fix unit test under Ubuntu
fixes Issue 629, thanks to joshua.downer for the report and fix
This commit is contained in:
@@ -8,6 +8,17 @@
|
|||||||
|
|
||||||
#define TEST_NUM_UNITSPHERE_POINTS 42
|
#define TEST_NUM_UNITSPHERE_POINTS 42
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
struct compLess
|
||||||
|
{
|
||||||
|
bool operator()(const int& p1, const int& p2) const
|
||||||
|
{
|
||||||
|
return p1 < p2;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
static btVector3 sPenetrationDirections[TEST_NUM_UNITSPHERE_POINTS] =
|
static btVector3 sPenetrationDirections[TEST_NUM_UNITSPHERE_POINTS] =
|
||||||
{
|
{
|
||||||
btVector3(btScalar(0.000000) , btScalar(-0.000000),btScalar(-1.000000)),
|
btVector3(btScalar(0.000000) , btScalar(-0.000000),btScalar(-1.000000)),
|
||||||
@@ -116,14 +127,7 @@ public:
|
|||||||
m_unsortedIntegers[i] = i;
|
m_unsortedIntegers[i] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct compLess
|
m_unsortedIntegers.quickSort(::compLess());
|
||||||
{
|
|
||||||
bool operator()(const int& p1, const int& p2) const
|
|
||||||
{
|
|
||||||
return p1 < p2;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
m_unsortedIntegers.quickSort(compLess());
|
|
||||||
for (int i=1;i<numElems;i++)
|
for (int i=1;i<numElems;i++)
|
||||||
{
|
{
|
||||||
CPPUNIT_ASSERT(m_unsortedIntegers[i-1]<=m_unsortedIntegers[i]);
|
CPPUNIT_ASSERT(m_unsortedIntegers[i-1]<=m_unsortedIntegers[i]);
|
||||||
@@ -132,7 +136,7 @@ public:
|
|||||||
{
|
{
|
||||||
m_unsortedIntegers[i] = numElems-i;
|
m_unsortedIntegers[i] = numElems-i;
|
||||||
}
|
}
|
||||||
m_unsortedIntegers.quickSort(compLess());
|
m_unsortedIntegers.quickSort(::compLess());
|
||||||
for (int i=1;i<numElems;i++)
|
for (int i=1;i<numElems;i++)
|
||||||
{
|
{
|
||||||
CPPUNIT_ASSERT(m_unsortedIntegers[i-1]<=m_unsortedIntegers[i]);
|
CPPUNIT_ASSERT(m_unsortedIntegers[i-1]<=m_unsortedIntegers[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user