Rework the unit-tests to use lower precision, so as to eliminate

false positives. Also some cleanup in the fuzzy compares.
This commit is contained in:
Benoit Jacob
2007-12-03 10:23:08 +00:00
parent 5abaaf9688
commit 346c00f4c8
6 changed files with 143 additions and 92 deletions

View File

@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
bool has_set_repeat = false;
bool has_set_seed = false;
bool want_help = false;
bool need_help = false;
unsigned int seed;
int repeat;
@@ -70,23 +70,18 @@ int main(int argc, char *argv[])
return 1;
}
}
else if(arg == "h" || arg == "-h" || arg.contains("help", Qt::CaseInsensitive))
{
want_help = true;
}
else
{
qDebug() << "Invalid command-line argument" << arg;
return 1;
need_help = true;
}
}
if(want_help)
if(need_help)
{
qDebug() << "This test application takes the following optional arguments:";
qDebug() << " rN Repeat each test N times (default:" << DEFAULT_REPEAT << ")";
qDebug() << " sN Use N as seed for random numbers (default: based on current time)";
return 0;
return 1;
}
if(!has_set_seed) seed = (unsigned int) time(NULL);