Test harness: 64bit warnings fixes.
This commit is contained in:
@@ -25,7 +25,7 @@ _EXPORT
|
|||||||
void
|
void
|
||||||
BTestCase::NextSubTest() {
|
BTestCase::NextSubTest() {
|
||||||
if (BTestShell::GlobalBeVerbose()) {
|
if (BTestShell::GlobalBeVerbose()) {
|
||||||
printf("[%ld]", fSubTestNum++);
|
printf("[%" B_PRId32 "]", fSubTestNum++);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ BThreadedTestCase::BThreadedTestCase(string name, string progressSeparator)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_EXPORT
|
_EXPORT
|
||||||
BThreadedTestCase::~BThreadedTestCase() {
|
BThreadedTestCase::~BThreadedTestCase() {
|
||||||
// Kill our locker
|
// Kill our locker
|
||||||
@@ -24,13 +25,13 @@ BThreadedTestCase::~BThreadedTestCase() {
|
|||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
for (map<thread_id, ThreadSubTestInfo*>::iterator i = fNumberMap.begin();
|
for (map<thread_id, ThreadSubTestInfo*>::iterator i = fNumberMap.begin();
|
||||||
i != fNumberMap.end();
|
i != fNumberMap.end(); i++)
|
||||||
i++)
|
|
||||||
{
|
{
|
||||||
delete i->second;
|
delete i->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_EXPORT
|
_EXPORT
|
||||||
void
|
void
|
||||||
BThreadedTestCase::NextSubTest() {
|
BThreadedTestCase::NextSubTest() {
|
||||||
@@ -45,8 +46,9 @@ BThreadedTestCase::NextSubTest() {
|
|||||||
// Handle multi-threaded case
|
// Handle multi-threaded case
|
||||||
ThreadSubTestInfo *info = i->second;
|
ThreadSubTestInfo *info = i->second;
|
||||||
char num[32];
|
char num[32];
|
||||||
sprintf(num, "%ld", info->subTestNum++);
|
sprintf(num, "%" B_PRId32 "", info->subTestNum++);
|
||||||
string str = string("[") + info->name + fProgressSeparator + num + "]";
|
string str = string("[") + info->name + fProgressSeparator + num
|
||||||
|
+ "]";
|
||||||
fUpdateList.push_back(str);
|
fUpdateList.push_back(str);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -56,6 +58,7 @@ BThreadedTestCase::NextSubTest() {
|
|||||||
BTestCase::NextSubTest();
|
BTestCase::NextSubTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_EXPORT
|
_EXPORT
|
||||||
void
|
void
|
||||||
BThreadedTestCase::Outputf(const char *str, ...) {
|
BThreadedTestCase::Outputf(const char *str, ...) {
|
||||||
@@ -76,7 +79,9 @@ BThreadedTestCase::Outputf(const char *str, ...) {
|
|||||||
} else {
|
} else {
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, str);
|
va_start(args, str);
|
||||||
char msg[1024]; // Need a longer string? Change the constant or change the function. :-)
|
char msg[1024];
|
||||||
|
// FIXME Need a longer string? Change the constant or change the
|
||||||
|
// function. :-)
|
||||||
vsprintf(msg, str, args);
|
vsprintf(msg, str, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
{
|
{
|
||||||
@@ -88,6 +93,7 @@ BThreadedTestCase::Outputf(const char *str, ...) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_EXPORT
|
_EXPORT
|
||||||
void
|
void
|
||||||
BThreadedTestCase::InitThreadInfo(thread_id id, string threadName) {
|
BThreadedTestCase::InitThreadInfo(thread_id id, string threadName) {
|
||||||
@@ -105,6 +111,7 @@ BThreadedTestCase::InitThreadInfo(thread_id id, string threadName) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_EXPORT
|
_EXPORT
|
||||||
bool
|
bool
|
||||||
BThreadedTestCase::RegisterForUse() {
|
BThreadedTestCase::RegisterForUse() {
|
||||||
@@ -115,12 +122,14 @@ BThreadedTestCase::RegisterForUse() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_EXPORT
|
_EXPORT
|
||||||
void
|
void
|
||||||
BThreadedTestCase::UnregisterForUse() {
|
BThreadedTestCase::UnregisterForUse() {
|
||||||
fInUse = false;
|
fInUse = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_EXPORT
|
_EXPORT
|
||||||
vector<string>&
|
vector<string>&
|
||||||
BThreadedTestCase::AcquireUpdateList() {
|
BThreadedTestCase::AcquireUpdateList() {
|
||||||
@@ -128,6 +137,7 @@ BThreadedTestCase::AcquireUpdateList() {
|
|||||||
return fUpdateList;
|
return fUpdateList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_EXPORT
|
_EXPORT
|
||||||
void
|
void
|
||||||
BThreadedTestCase::ReleaseUpdateList() {
|
BThreadedTestCase::ReleaseUpdateList() {
|
||||||
|
|||||||
Reference in New Issue
Block a user