Fixed a few warnings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4381 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2003-08-26 21:36:38 +00:00
parent 9f01bd9197
commit 66abd4d0a6
8 changed files with 18 additions and 14 deletions
+2 -3
View File
@@ -20,8 +20,8 @@ const char BTestShell::indent[] = " ";
BTestShell::BTestShell(const std::string &description, SyncObject *syncObject)
: fVerbosityLevel(v2)
, fDescription(description)
, fTestResults(syncObject)
, fDescription(description)
, fListTestsAndExit(false)
, fTestDir(NULL)
{
@@ -42,7 +42,6 @@ BTestShell::AddSuite(BTestSuite *suite) {
fSuites[suite->getName()] = suite;
// Add its tests
bool first = true;
const TestMap &map = suite->getTests();
for (TestMap::const_iterator i = map.begin();
i != map.end();
@@ -378,7 +377,7 @@ BTestShell::LoadDynamicSuites() {
BDirectory libDir((*i).c_str());
if (Verbosity() >= v3)
cout << "Checking " << *i << endl;
int count = LoadSuitesFrom(&libDir);
/* int count =*/ LoadSuitesFrom(&libDir);
if (Verbosity() >= v3) {
// cout << "Loaded " << count << " suite" << (count == 1 ? "" : "s");
// cout << " from " << *i << endl;
@@ -163,12 +163,12 @@ CompilerOutputter::wrap( std::string message )
std::string line( *it );
const int maxLineLength = 80;
int index =0;
while ( index < line.length() )
while ( index < (int)line.length() )
{
std::string line( line.substr( index, maxLineLength ) );
wrapped += line;
index += maxLineLength;
if ( index < line.length() )
if ( index < (int)line.length() )
wrapped += "\n";
}
wrapped += '\n';
+2 -2
View File
@@ -14,10 +14,10 @@ namespace TextUi {
* \param outputter used to print text result. Owned by the runner.
*/
TestRunner::TestRunner( Outputter *outputter )
: m_outputter( outputter )
, m_suite( new TestSuite( "All Tests" ) )
: m_suite( new TestSuite( "All Tests" ) )
, m_result( new TestResultCollector() )
, m_eventManager( new TestResult() )
, m_outputter( outputter )
{
if ( !m_outputter )
m_outputter = new TextOutputter( m_result, std::cout );
+3 -3
View File
@@ -108,7 +108,7 @@ std::string
XmlOutputter::Node::escape( std::string value ) const
{
std::string escaped;
for ( int index =0; index < value.length(); ++index )
for ( int index =0; index < (int)value.length(); ++index )
{
char c = value[index ];
switch ( c ) // escape all predefined XML entity (safe?)
@@ -229,7 +229,7 @@ XmlOutputter::addFailedTests( FailedTests &failedTests,
rootNode->addNode( testsNode );
const TestResultCollector::Tests &tests = m_result->tests();
for ( int testNumber = 0; testNumber < tests.size(); ++testNumber )
for ( int testNumber = 0; testNumber < (int)tests.size(); ++testNumber )
{
Test *test = tests[testNumber];
if ( failedTests.find( test ) != failedTests.end() )
@@ -246,7 +246,7 @@ XmlOutputter::addSucessfulTests( FailedTests &failedTests,
rootNode->addNode( testsNode );
const TestResultCollector::Tests &tests = m_result->tests();
for ( int testNumber = 0; testNumber < tests.size(); ++testNumber )
for ( int testNumber = 0; testNumber < (int)tests.size(); ++testNumber )
{
Test *test = tests[testNumber];
if ( failedTests.find( test ) == failedTests.end() )