diff --git a/src/tools/cppunit/BTestCase.cpp b/src/tools/cppunit/BTestCase.cpp index 84dfd42e89..3a59f72620 100644 --- a/src/tools/cppunit/BTestCase.cpp +++ b/src/tools/cppunit/BTestCase.cpp @@ -25,7 +25,7 @@ _EXPORT void BTestCase::NextSubTest() { if (BTestShell::GlobalBeVerbose()) { - printf("[%ld]", fSubTestNum++); + printf("[%" B_PRId32 "]", fSubTestNum++); fflush(stdout); } } diff --git a/src/tools/cppunit/ThreadedTestCase.cpp b/src/tools/cppunit/ThreadedTestCase.cpp index 0fcee86a89..cdc35ccf9c 100644 --- a/src/tools/cppunit/ThreadedTestCase.cpp +++ b/src/tools/cppunit/ThreadedTestCase.cpp @@ -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::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& BThreadedTestCase::AcquireUpdateList() { @@ -128,6 +137,7 @@ BThreadedTestCase::AcquireUpdateList() { return fUpdateList; } + _EXPORT void BThreadedTestCase::ReleaseUpdateList() {