Commit aa436fea authored by berenger-bramas's avatar berenger-bramas

Changed assert to fassert to avoid conflict with cassert

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@463 2616d619-271b-44dc-8df4-d4a8f33a7222
parent f60bbb32
......@@ -28,7 +28,7 @@ public:
/**
* @param particle The new particle to be added to the leaf
*/
void push(const FChebParticle& inParticle)
void push(const ParticleClass& inParticle)
{
particles.push(inParticle);
}
......
......@@ -5,7 +5,7 @@
// Blas
///////////////////////////////////////////////////////
#cmakedefine SCALFMM_USE_CBLAS
#cmakedefine SCALFMM_USE_BLAS
#cmakedefine SCALFMM_USE_MKL_AS_BLAS
///////////////////////////////////////////////////////
......
......@@ -117,7 +117,7 @@ protected:
* @param result the test result
* if result is false test failled
*/
void assert(const bool result){
void uassert(const bool result){
++currentStep;
if(!result){
std::cout << ">> Step " << currentStep << " Failled\n";
......@@ -133,7 +133,7 @@ protected:
*/
template <class T>
void equal(const T& v1, const T& v2){
assert(v1 == v2);
uassert(v1 == v2);
}
/**
......@@ -144,7 +144,7 @@ protected:
*/
template <class T>
void different(const T& v1, const T& v2){
assert(v1 != v2);
uassert(v1 != v2);
}
public :
......
......@@ -24,14 +24,14 @@ class TestArray : public FUTester<TestArray> {
void TestGetSet(){
FBoolArray array(500);
for(int idx = 0 ; idx < 500 ; ++idx){
assert(!array.get(idx));
uassert(!array.get(idx));
}
for(int idx = 0 ; idx < 500 ; ++idx){
array.set(idx, true);
assert(array.get(idx));
uassert(array.get(idx));
array.set(idx, false);
assert(!array.get(idx));
uassert(!array.get(idx));
}
for(int idx = 0 ; idx < 500 ; ++idx){
......@@ -39,7 +39,7 @@ class TestArray : public FUTester<TestArray> {
}
array.setToZeros();
for(int idx = 0 ; idx < 500 ; ++idx){
assert(!array.get(idx));
uassert(!array.get(idx));
}
}
......@@ -49,10 +49,10 @@ class TestArray : public FUTester<TestArray> {
for(int idx = 0 ; idx < 100 ; ++idx){
if(idx%3){
array.set(idx, true);
assert(array.get(idx));
uassert(array.get(idx));
}
else{
assert(!array.get(idx));
uassert(!array.get(idx));
}
}
}
......@@ -62,17 +62,17 @@ class TestArray : public FUTester<TestArray> {
FBoolArray array2(10);
assert(array1 == array2);
uassert(array1 == array2);
array1.set(1, true);
assert(array1 != array2);
uassert(array1 != array2);
array2.set(1, true);
assert(array1 == array2);
uassert(array1 == array2);
array1.set(5, true);
array2 = array1;
assert(array1 == array2);
uassert(array1 == array2);
}
// set test
......
......@@ -28,10 +28,10 @@ class TestBuffer : public FUTester<TestBuffer> {
writer << idxWrite << char(idxWrite) << double(idxWrite) << float(idxWrite);
}
assert(writer.getSize() == (NbTest*BytesTested));
uassert(writer.getSize() == (NbTest*BytesTested));
FBufferReader reader(writer.getSize());
assert(reader.getSize() == writer.getSize());
uassert(reader.getSize() == writer.getSize());
memcpy(reader.data(), writer.data(), writer.getSize());
for(int idxRead = 0 ; idxRead < NbTest ; ++idxRead){
......@@ -41,28 +41,28 @@ class TestBuffer : public FUTester<TestBuffer> {
float floatval;
reader >> intval >> charval >> doubleval >> floatval;
assert(intval == idxRead);
assert(charval == char(idxRead));
assert(doubleval == double(idxRead));
assert(floatval == float(idxRead));
uassert(intval == idxRead);
uassert(charval == char(idxRead));
uassert(doubleval == double(idxRead));
uassert(floatval == float(idxRead));
assert(reader.tell() == (BytesTested * (idxRead+1)));
uassert(reader.tell() == (BytesTested * (idxRead+1)));
}
assert(reader.tell() == reader.getSize());
uassert(reader.tell() == reader.getSize());
reader.seek(0);
assert(reader.tell() == 0);
uassert(reader.tell() == 0);
for(int idxRead = 0 ; idxRead < NbTest ; ++idxRead){
assert(reader.FBufferReader::getValue<int>() == idxRead);
assert(reader.FBufferReader::getValue<char>() == char(idxRead));
assert(reader.FBufferReader::getValue<double>() == double(idxRead));
assert(reader.FBufferReader::getValue<float>() == float(idxRead));
uassert(reader.FBufferReader::getValue<int>() == idxRead);
uassert(reader.FBufferReader::getValue<char>() == char(idxRead));
uassert(reader.FBufferReader::getValue<double>() == double(idxRead));
uassert(reader.FBufferReader::getValue<float>() == float(idxRead));
assert(reader.tell() == (BytesTested * (idxRead+1)));
uassert(reader.tell() == (BytesTested * (idxRead+1)));
}
assert(reader.tell() == reader.getSize());
uassert(reader.tell() == reader.getSize());
}
......@@ -74,11 +74,11 @@ class TestBuffer : public FUTester<TestBuffer> {
for(int idxWrite = 0 ; idxWrite < NbTest ; ++idxWrite){
const int position = writer.getSize();
assert(position == (NbTest * SizeOfInt * idxWrite) + (idxWrite * SizeOfInt));
uassert(position == (NbTest * SizeOfInt * idxWrite) + (idxWrite * SizeOfInt));
writer.FBufferWriter::write<int>(0);
assert(writer.getSize() == (NbTest * SizeOfInt * idxWrite) + (idxWrite * SizeOfInt) + SizeOfInt);
uassert(writer.getSize() == (NbTest * SizeOfInt * idxWrite) + (idxWrite * SizeOfInt) + SizeOfInt);
for(int count = 1 ; count <= NbTest ; ++count) writer << count;
writer.writeAt(position, idxWrite);
......@@ -88,9 +88,9 @@ class TestBuffer : public FUTester<TestBuffer> {
memcpy(reader.data(), writer.data(), writer.getSize());
for(int idxWrite = 0 ; idxWrite < NbTest ; ++idxWrite){
assert(reader.FBufferReader::getValue<int>() == idxWrite);
uassert(reader.FBufferReader::getValue<int>() == idxWrite);
for(int count = 1 ; count <= NbTest ; ++count){
assert(reader.FBufferReader::getValue<int>() == count);
uassert(reader.FBufferReader::getValue<int>() == count);
}
}
}
......
......@@ -55,14 +55,14 @@ class TestList : public FUTester<TestList> {
list.push(TestObject());
list.push(TestObject());
list.push(TestObject());
assert(list.getSize() == 3);
uassert(list.getSize() == 3);
assert((TestObject::counter - TestObject::dealloced) == list.getSize());
uassert((TestObject::counter - TestObject::dealloced) == list.getSize());
list.clear();
assert(list.getSize() == 0);
uassert(list.getSize() == 0);
assert(TestObject::counter == TestObject::dealloced);
uassert(TestObject::counter == TestObject::dealloced);
}
// test copy
......@@ -73,9 +73,9 @@ class TestList : public FUTester<TestList> {
list.push(TestObject());
FList<TestObject> list2 = list;
assert(list.getSize() == list2.getSize());
uassert(list.getSize() == list2.getSize());
assert((TestObject::counter - TestObject::dealloced) == (list.getSize() + list2.getSize()));
uassert((TestObject::counter - TestObject::dealloced) == (list.getSize() + list2.getSize()));
}
// test iter
......@@ -83,7 +83,7 @@ class TestList : public FUTester<TestList> {
FList<TestObject> list;
{
FList<TestObject>::ConstBasicIterator iter(list);
assert(!iter.hasNotFinished());
uassert(!iter.hasNotFinished());
}
{
list.push(TestObject());
......@@ -91,7 +91,7 @@ class TestList : public FUTester<TestList> {
list.push(TestObject());
FList<TestObject>::ConstBasicIterator iter(list);
assert(iter.hasNotFinished());
uassert(iter.hasNotFinished());
int counter = 0;
while(iter.hasNotFinished()){
......@@ -99,8 +99,8 @@ class TestList : public FUTester<TestList> {
++counter;
}
assert(!iter.hasNotFinished());
assert(counter == list.getSize());
uassert(!iter.hasNotFinished());
uassert(counter == list.getSize());
}
}
......
......@@ -26,45 +26,45 @@ class TestMorton : public FUTester<TestMorton> {
FTreeCoordinate pos(5,1,7);
FTreeCoordinate cp;
cp.setPositionFromMorton(pos.getMortonIndex(10),10);
assert(pos == cp);
assert(cp.getMortonIndex(10) == pos.getMortonIndex(10));
uassert(pos == cp);
uassert(cp.getMortonIndex(10) == pos.getMortonIndex(10));
}
{
FTreeCoordinate pos(2,8,3);
FTreeCoordinate cp;
cp.setPositionFromMorton(pos.getMortonIndex(10),10);
assert(pos == cp);
assert(cp.getMortonIndex(10) == pos.getMortonIndex(10));
uassert(pos == cp);
uassert(cp.getMortonIndex(10) == pos.getMortonIndex(10));
}
{
FTreeCoordinate pos(51,11,47);
FTreeCoordinate cp;
cp.setPositionFromMorton(pos.getMortonIndex(10),10);
assert(pos == cp);
assert(cp.getMortonIndex(10) == pos.getMortonIndex(10));
uassert(pos == cp);
uassert(cp.getMortonIndex(10) == pos.getMortonIndex(10));
}
}
void Position(){
{
FTreeCoordinate pos(0,0,0);
assert(pos.getMortonIndex(1) == 0);
uassert(pos.getMortonIndex(1) == 0);
}
{
FTreeCoordinate pos(1,1,1);
assert(pos.getMortonIndex(1) == 7);
uassert(pos.getMortonIndex(1) == 7);
}
{
FTreeCoordinate pos(0,1,1);
assert(pos.getMortonIndex(1) == 3);
uassert(pos.getMortonIndex(1) == 3);
}
{
FTreeCoordinate pos(2,2,2);
assert(pos.getMortonIndex(2) == (7 << 3) );
uassert(pos.getMortonIndex(2) == (7 << 3) );
}
{
FTreeCoordinate pos(1,2,4);
assert(pos.getMortonIndex(3) == 84 );// 001 010 100 =>> 001010100 => 84d
uassert(pos.getMortonIndex(3) == 84 );// 001 010 100 =>> 001010100 => 84d
}
}
......
......@@ -79,11 +79,11 @@ class TestOctree : public FUTester<TestOctree> {
MortonIndex currentIndex = 0;
do{
// Morton index must increase one by one
assert( currentIndex == octreeIterator.getCurrentGlobalIndex());
uassert( currentIndex == octreeIterator.getCurrentGlobalIndex());
++currentIndex;
} while(octreeIterator.moveRight());
// Then number of cells must be divided by 8 at each level
assert(currentIndex == nbCell);
uassert(currentIndex == nbCell);
nbCell /= 8;
octreeIterator.moveUp();
......
......@@ -22,41 +22,41 @@
/** this class test the list container */
class TestParameters : public FUTester<TestParameters> {
void Lower(){
assert(FParameters::toLower('A') == 'a');
assert(FParameters::toLower('Z') == 'z');
assert(FParameters::toLower('a') == 'a');
assert(FParameters::toLower('z') == 'z');
assert(FParameters::toLower('m') == 'm');
assert(FParameters::toLower(';') == ';');
uassert(FParameters::toLower('A') == 'a');
uassert(FParameters::toLower('Z') == 'z');
uassert(FParameters::toLower('a') == 'a');
uassert(FParameters::toLower('z') == 'z');
uassert(FParameters::toLower('m') == 'm');
uassert(FParameters::toLower(';') == ';');
}
void CharsEquals(){
assert(FParameters::areCharsEquals('a','A',false));
assert(FParameters::areCharsEquals('A','A',false));
assert(FParameters::areCharsEquals('A','a',false));
assert(FParameters::areCharsEquals('a','a',false));
assert(!FParameters::areCharsEquals('a','l',false));
assert(!FParameters::areCharsEquals('a','M',false));
assert(!FParameters::areCharsEquals('1',';',false));
assert(!FParameters::areCharsEquals('a','A',true));
assert(FParameters::areCharsEquals('A','A',true));
assert(!FParameters::areCharsEquals('A','a',true));
assert(FParameters::areCharsEquals('a','a',true));
assert(FParameters::areCharsEquals(';',';',true));
uassert(FParameters::areCharsEquals('a','A',false));
uassert(FParameters::areCharsEquals('A','A',false));
uassert(FParameters::areCharsEquals('A','a',false));
uassert(FParameters::areCharsEquals('a','a',false));
uassert(!FParameters::areCharsEquals('a','l',false));
uassert(!FParameters::areCharsEquals('a','M',false));
uassert(!FParameters::areCharsEquals('1',';',false));
uassert(!FParameters::areCharsEquals('a','A',true));
uassert(FParameters::areCharsEquals('A','A',true));
uassert(!FParameters::areCharsEquals('A','a',true));
uassert(FParameters::areCharsEquals('a','a',true));
uassert(FParameters::areCharsEquals(';',';',true));
}
void StrsEquals(){
assert(FParameters::areStrEquals("","",false));
assert(FParameters::areStrEquals("aa","Aa",false));
assert(!FParameters::areStrEquals("az","azz",false));
assert(FParameters::areStrEquals("aza","azA",false));
assert(FParameters::areStrEquals("a","a",true));
assert(FParameters::areStrEquals("az","az",true));
assert(!FParameters::areStrEquals("aza","azA",true));
assert(!FParameters::areStrEquals("az","azA",true));
uassert(FParameters::areStrEquals("","",false));
uassert(FParameters::areStrEquals("aa","Aa",false));
uassert(!FParameters::areStrEquals("az","azz",false));
uassert(FParameters::areStrEquals("aza","azA",false));
uassert(FParameters::areStrEquals("a","a",true));
uassert(FParameters::areStrEquals("az","az",true));
uassert(!FParameters::areStrEquals("aza","azA",true));
uassert(!FParameters::areStrEquals("az","azA",true));
}
void FindParameter(){
......@@ -68,22 +68,22 @@ class TestParameters : public FUTester<TestParameters> {
"tu.tU"
};
assert(FParameters::findParameter(argc,argv,"tOto",false) == 0);
assert(FParameters::findParameter(argc,argv,"titi",false) == 1);
assert(FParameters::findParameter(argc,argv,"tAtA",false) == 2);
assert(FParameters::findParameter(argc,argv,"tu.tu",false) == 3);
uassert(FParameters::findParameter(argc,argv,"tOto",false) == 0);
uassert(FParameters::findParameter(argc,argv,"titi",false) == 1);
uassert(FParameters::findParameter(argc,argv,"tAtA",false) == 2);
uassert(FParameters::findParameter(argc,argv,"tu.tu",false) == 3);
for(int idx = 0 ; idx < argc ; ++idx){
assert(FParameters::findParameter(argc,argv,argv[idx],true) == idx);
uassert(FParameters::findParameter(argc,argv,argv[idx],true) == idx);
}
assert(FParameters::findParameter(argc,argv,"tu.tu",true) == -1);
assert(FParameters::findParameter(argc,argv,"TOTO",true) == -1);
uassert(FParameters::findParameter(argc,argv,"tu.tu",true) == -1);
uassert(FParameters::findParameter(argc,argv,"TOTO",true) == -1);
}
void StrToOther(){
assert(FParameters::StrToOther<int>("0") == 0);
assert(FParameters::StrToOther<int>("a",1) == 1);
uassert(FParameters::StrToOther<int>("0") == 0);
uassert(FParameters::StrToOther<int>("a",1) == 1);
}
// set test
......
......@@ -44,7 +44,7 @@ class TestQuickSort : public FUTester<TestQuickSort> {
FQuickSort<long long, long long, long>::QsOmp(array, Size);
assert(IsSorted(array,Size));
uassert(IsSorted(array,Size));
}
omp_set_num_threads(originalThreadsNumber);
......@@ -60,7 +60,7 @@ class TestQuickSort : public FUTester<TestQuickSort> {
}
FQuickSort<long long, long long, long>::QsOmp(array, Size);
assert(IsSorted(array,Size));
uassert(IsSorted(array,Size));
delete [] array;
}
......
......@@ -62,7 +62,7 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> {
FFmaBinLoader<ParticleClass> loader("../../Data/utestSphericalDirect.bin.fma");
if(!loader.isOpen()){
Print("Cannot open particles file.");
assert(false);
uassert(false);
return;
}
Print("Number of particles:");
......@@ -143,14 +143,14 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> {
// Assert
const FReal MaximumDiff = FReal(0.0001);
assert(potentialDiff.getL2Norm() < MaximumDiff);
assert(potentialDiff.getInfNorm() < MaximumDiff);
assert(fx.getL2Norm() < MaximumDiff);
assert(fx.getInfNorm() < MaximumDiff);
assert(fy.getL2Norm() < MaximumDiff);
assert(fy.getInfNorm() < MaximumDiff);
assert(fz.getL2Norm() < MaximumDiff);
assert(fz.getInfNorm() < MaximumDiff);
uassert(potentialDiff.getL2Norm() < MaximumDiff);
uassert(potentialDiff.getInfNorm() < MaximumDiff);
uassert(fx.getL2Norm() < MaximumDiff);
uassert(fx.getInfNorm() < MaximumDiff);
uassert(fy.getL2Norm() < MaximumDiff);
uassert(fy.getInfNorm() < MaximumDiff);
uassert(fz.getL2Norm() < MaximumDiff);
uassert(fz.getInfNorm() < MaximumDiff);
}
/** If memstas is running print the memory used */
......@@ -200,7 +200,7 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> {
OctreeClass, FmmClass>(false);
}
#ifdef SCALFMM_USE_CBLAS
#ifdef SCALFMM_USE_BLAS
/** Blas */
void TestSphericalBlas(){
typedef IndexedParticle ParticleClass;
......@@ -244,7 +244,7 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> {
void SetTests(){
AddTest(&TestSphericalDirect::TestSpherical,"Test Spherical Kernel");
AddTest(&TestSphericalDirect::TestRotation,"Test Rotation Spherical Kernel");
#ifdef SCALFMM_USE_CBLAS
#ifdef SCALFMM_USE_BLAS
AddTest(&TestSphericalDirect::TestSphericalBlas,"Test Spherical Blas Kernel");
AddTest(&TestSphericalDirect::TestSphericalBlockBlas,"Test Spherical Block Blas Kernel");
#endif
......
......@@ -193,14 +193,14 @@ class TestSphericalDirectPeriodic : public FUTester<TestSphericalDirectPeriodic>
Print(fz.getInfNorm());
const FReal MaximumDiff = FReal(0.0001);
assert(potentialDiff.getL2Norm() < MaximumDiff);
assert(potentialDiff.getInfNorm() < MaximumDiff);
assert(fx.getL2Norm() < MaximumDiff);
assert(fx.getInfNorm() < MaximumDiff);
assert(fy.getL2Norm() < MaximumDiff);
assert(fy.getInfNorm() < MaximumDiff);
assert(fz.getL2Norm() < MaximumDiff);
assert(fz.getInfNorm() < MaximumDiff);
uassert(potentialDiff.getL2Norm() < MaximumDiff);
uassert(potentialDiff.getInfNorm() < MaximumDiff);
uassert(fx.getL2Norm() < MaximumDiff);
uassert(fx.getInfNorm() < MaximumDiff);
uassert(fy.getL2Norm() < MaximumDiff);
uassert(fy.getInfNorm() < MaximumDiff);
uassert(fz.getL2Norm() < MaximumDiff);
uassert(fz.getInfNorm() < MaximumDiff);
}
/** Test real Periodic FMM */
......@@ -354,14 +354,14 @@ class TestSphericalDirectPeriodic : public FUTester<TestSphericalDirectPeriodic>
Print(fz.getInfNorm());
const FReal MaximumDiff = FReal(0.0001);
assert(potentialDiff.getL2Norm() < MaximumDiff);
assert(potentialDiff.getInfNorm() < MaximumDiff);
assert(fx.getL2Norm() < MaximumDiff);
assert(fx.getInfNorm() < MaximumDiff);
assert(fy.getL2Norm() < MaximumDiff);
assert(fy.getInfNorm() < MaximumDiff);
assert(fz.getL2Norm() < MaximumDiff);
assert(fz.getInfNorm() < MaximumDiff);
uassert(potentialDiff.getL2Norm() < MaximumDiff);
uassert(potentialDiff.getInfNorm() < MaximumDiff);
uassert(fx.getL2Norm() < MaximumDiff);
uassert(fx.getInfNorm() < MaximumDiff);
uassert(fy.getL2Norm() < MaximumDiff);
uassert(fy.getInfNorm() < MaximumDiff);
uassert(fz.getL2Norm() < MaximumDiff);
uassert(fz.getInfNorm() < MaximumDiff);
}
......@@ -425,7 +425,7 @@ class TestSphericalDirectPeriodic : public FUTester<TestSphericalDirectPeriodic>
typename TestContainerClass::BasicIterator leafIter(*octreeIterator.getCurrentListTargets());
while( leafIter.hasNotFinished() ){
assert(leafIter.data().getDataDown() == directNbPart - 1);// todo delete
uassert(leafIter.data().getDataDown() == directNbPart - 1);// todo delete
leafIter.gotoNext();
......
......@@ -56,7 +56,7 @@ class TestSphericalWithPrevious : public FUTester<TestSphericalWithPrevious> {
FFmaBinLoader<ParticleClass> loader(ParticleFile);
if(!loader.isOpen()){
Print("Cannot open particles file.");
assert(false);
uassert(false);
return;
}
......@@ -88,12 +88,12 @@ class TestSphericalWithPrevious : public FUTester<TestSphericalWithPrevious> {
do{
if(testOctreeIterator.getCurrentGlobalIndex() != goodOctreeIterator.getCurrentGlobalIndex()){
assert(false);
uassert(false);
break;
}
if(testOctreeIterator.getCurrentListSrc()->getSize() != goodOctreeIterator.getCurrentListSrc()->getSize()){
assert(false);
uassert(false);
break;
}
......@@ -101,10 +101,10 @@ class TestSphericalWithPrevious : public FUTester<TestSphericalWithPrevious> {
typename ContainerClass::BasicIterator testIter(*testOctreeIterator.getCurrentListTargets());
while( goodIter.hasNotFinished() ){
assert( FMath::LookEqual(goodIter.data().getPotential(), testIter.data().getPotential()) );
assert( FMath::LookEqual(goodIter.data().getPosition().getX(), testIter.data().getPosition().getX()) );
assert( FMath::LookEqual(goodIter.data().getPosition().getY(), testIter.data().getPosition().getY()) );
assert( FMath::LookEqual(goodIter.data().getPosition().getZ(), testIter.data().getPosition().getZ()) );
uassert( FMath::LookEqual(goodIter.data().getPotential(), testIter.data().getPotential()) );
uassert( FMath::LookEqual(goodIter.data().getPosition().getX(), testIter.data().getPosition().getX()) );
uassert( FMath::LookEqual(goodIter.data().getPosition().getY(), testIter.data().getPosition().getY()) );
uassert( FMath::LookEqual(goodIter.data().getPosition().getZ(), testIter.data().getPosition().getZ()) );
goodIter.gotoNext();
testIter.gotoNext();
......@@ -113,12 +113,12 @@ class TestSphericalWithPrevious : public FUTester<TestSphericalWithPrevious> {
if(!testOctreeIterator.moveRight()){
if(goodOctreeIterator.moveRight()){
assert(false);
uassert(false);
}
break;
}
if(!goodOctreeIterator.moveRight()){
assert(false);
uassert(false);
break;
}
......@@ -135,7 +135,7 @@ class TestSphericalWithPrevious : public FUTester<TestSphericalWithPrevious> {
for(int idxLevel = NbLevels - 1 ; idxLevel > 1 ; --idxLevel ){
do{
if(testOctreeIterator.getCurrentGlobalIndex() != goodOctreeIterator.getCurrentGlobalIndex()){
assert(false);
uassert(false);
break;
}
......@@ -155,12 +155,12 @@ class TestSphericalWithPrevious : public FUTester<TestSphericalWithPrevious> {
if(!testOctreeIterator.moveRight()){
if(goodOctreeIterator.moveRight()){
assert(false);
uassert(false);
}
break;
}
if(!goodOctreeIterator.moveRight()){
assert(false);
uassert(false);
break;
}
......
......@@ -19,9 +19,9 @@ class MyTest : public FUTester<MyTest> {
}
void TestOne(){
assert(true);
//or assert(false); make an error
assert(1 == 1);
uassert(true);
//or uassert(false); make an error
uassert(1 == 1);
}
void TestTwo(){
......
......@@ -54,14 +54,14 @@ class TestVector : public FUTester<TestVector> {
vector.push(TestObject());
vector.push(TestObject());
vector.push(TestObject());
assert(vector.getSize() == 3);
uassert(vector.getSize() == 3);
assert((TestObject::counter - TestObject::dealloced) == vector.getSize());
uassert((TestObject::counter - TestObject::dealloced) == vector.getSize());
vector.clear();
assert(vector.getSize() == 0);
uassert(vector.getSize() == 0);
assert(TestObject::counter == TestObject::dealloced);
uassert(TestObject::counter == TestObject::dealloced);
}
// test copy
......@@ -73,14 +73,14 @@ class TestVector : public FUTester<TestVector> {
{
FVector<TestObject> vector2(vector);
assert(vector.getSize() == vector2.getSize());
assert((TestObject::counter - TestObject::dealloced) == (vector.getSize() + vector2.getSize()));
uassert(vector.getSize() == vector2.getSize());
uassert((TestObject::counter - TestObject::dealloced) == (vector.getSize() + vector2.getSize()));
}
{
FVector<TestObject> vector2(vector.getSize()/2);
vector2 = vector;
assert(vector.getSize() == vector2.getSize());
assert((TestObject::counter - TestObject::dealloced) == (vector.getSize() + vector2.getSize()));
uassert(vector.getSize() == vector2.getSize());
uassert((TestObject::counter - TestObject::dealloced) == (vector.getSize() + vector2.getSize()));
}
}
......@@ -89,7 +89,7 @@ class TestVector : public FUTester<TestVector> {
FVector<TestObject> vector;
{
FVector<TestObject>::ConstBasicIterator iter(vector);
assert(!iter.hasNotFinished());
uassert(!iter.hasNotFinished());
}
{
vector.push(TestObject());
......@@ -97,12 +97,12 @@ class TestVector : public FUTester<TestVector> {
vector.push(TestObject());
FVector<TestObject>::ConstBasicIterator iter(vector);
assert(iter.hasNotFinished());
uassert(iter.hasNotFinished());
int counter = 0;
while(iter.hasNotFinished()){ iter.gotoNext(); ++counter; }
assert(!iter.hasNotFinished());
assert(counter == vector.getSize());
uassert(!iter.hasNotFinished());
uassert(counter == vector.getSize());
}
}
......@@ -111,7 +111,7 @@ class TestVector : public FUTester<TestVector> {
FVector<TestObject> vector;
{
FVector<TestObject>::BasicIterator iter(vector);
assert(!iter.hasNotFinished());
uassert(!iter.hasNotFinished());
}
{
vector.push(TestObject());
......@@ -119,16 +119,16 @@ class TestVector : public FUTester<TestVector> {
vector.push(TestObject());
FVector<TestObject>::BasicIterator iter(vector);
assert(iter