Test harness: 64bit warnings fixes.

This commit is contained in:
Adrien Destugues
2014-10-01 10:59:07 +02:00
parent d5f1b898ef
commit a8f520f2a8
2 changed files with 16 additions and 6 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ _EXPORT
void
BTestCase::NextSubTest() {
if (BTestShell::GlobalBeVerbose()) {
printf("[%ld]", fSubTestNum++);
printf("[%" B_PRId32 "]", fSubTestNum++);
fflush(stdout);
}
}
+15 -5
View File
@@ -17,6 +17,7 @@ BThreadedTestCase::BThreadedTestCase(string name, string progressSeparator)
{
}
_EXPORT
BThreadedTestCase::~BThreadedTestCase() {
// Kill our locker
@@ -24,13 +25,13 @@ BThreadedTestCase::~BThreadedTestCase() {
// Clean up
for (map<thread_id, ThreadSubTestInfo*>::iterator i = fNumberMap.begin();
i != fNumberMap.end();
i++)
i != fNumberMap.end(); i++)
{
delete i->second;
}
}
_EXPORT
void
BThreadedTestCase::NextSubTest() {
@@ -45,8 +46,9 @@ BThreadedTestCase::NextSubTest() {
// Handle multi-threaded case
ThreadSubTestInfo *info = i->second;
char num[32];
sprintf(num, "%ld", info->subTestNum++);
string str = string("[") + info->name + fProgressSeparator + num + "]";
sprintf(num, "%" B_PRId32 "", info->subTestNum++);
string str = string("[") + info->name + fProgressSeparator + num
+ "]";
fUpdateList.push_back(str);
return;
}
@@ -56,6 +58,7 @@ BThreadedTestCase::NextSubTest() {
BTestCase::NextSubTest();
}
_EXPORT
void
BThreadedTestCase::Outputf(const char *str, ...) {
@@ -76,7 +79,9 @@ BThreadedTestCase::Outputf(const char *str, ...) {
} else {
va_list args;
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);
va_end(args);
{
@@ -88,6 +93,7 @@ BThreadedTestCase::Outputf(const char *str, ...) {
}
}
_EXPORT
void
BThreadedTestCase::InitThreadInfo(thread_id id, string threadName) {
@@ -105,6 +111,7 @@ BThreadedTestCase::InitThreadInfo(thread_id id, string threadName) {
}
}
_EXPORT
bool
BThreadedTestCase::RegisterForUse() {
@@ -115,12 +122,14 @@ BThreadedTestCase::RegisterForUse() {
return false;
}
_EXPORT
void
BThreadedTestCase::UnregisterForUse() {
fInUse = false;
}
_EXPORT
vector<string>&
BThreadedTestCase::AcquireUpdateList() {
@@ -128,6 +137,7 @@ BThreadedTestCase::AcquireUpdateList() {
return fUpdateList;
}
_EXPORT
void
BThreadedTestCase::ReleaseUpdateList() {