Fixed so that the expected and actual values in asserts are not mixed

This commit is contained in:
Daniel Marjamäki 2008-12-06 12:57:06 +00:00
parent 4c92c8e6e7
commit 2cc7dbda67
1 changed files with 9 additions and 9 deletions

View File

@ -216,19 +216,19 @@ private:
void multi_compare()
{
// Test for found
ASSERT_EQUALS( TOKEN::multiCompare( "one|two", "one" ), 1 );
ASSERT_EQUALS( TOKEN::multiCompare( "one|two", "two" ), 1 );
ASSERT_EQUALS( TOKEN::multiCompare( "verybig|two|", "two" ), 1 );
ASSERT_EQUALS( 1, TOKEN::multiCompare( "one|two", "one" ) );
ASSERT_EQUALS( 1, TOKEN::multiCompare( "one|two", "two" ) );
ASSERT_EQUALS( 1, TOKEN::multiCompare( "verybig|two|", "two" ) );
// Test for empty string found
ASSERT_EQUALS( TOKEN::multiCompare( "|one|two", "notfound" ), 0 );
ASSERT_EQUALS( TOKEN::multiCompare( "one||two", "notfound" ), 0 );
ASSERT_EQUALS( TOKEN::multiCompare( "one|two|", "notfound" ), 0 );
ASSERT_EQUALS( 0, TOKEN::multiCompare( "|one|two", "notfound" ) );
ASSERT_EQUALS( 0, TOKEN::multiCompare( "one||two", "notfound" ) );
ASSERT_EQUALS( 0, TOKEN::multiCompare( "one|two|", "notfound" ) );
// Test for not found
ASSERT_EQUALS( TOKEN::multiCompare( "one|two", "notfound" ), -1 );
ASSERT_EQUALS( TOKEN::multiCompare( "verybig|two", "s" ), -1 );
ASSERT_EQUALS( TOKEN::multiCompare( "one|two", "ne" ), -1 );
ASSERT_EQUALS( -1, TOKEN::multiCompare( "one|two", "notfound" ) );
ASSERT_EQUALS( -1, TOKEN::multiCompare( "verybig|two", "s" ) );
ASSERT_EQUALS( -1, TOKEN::multiCompare( "one|two", "ne" ) );
}
void match1()