From 2cc7dbda67423e5ecb755682a49eb3d123a66def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 6 Dec 2008 12:57:06 +0000 Subject: [PATCH] Fixed so that the expected and actual values in asserts are not mixed --- testtokenize.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/testtokenize.cpp b/testtokenize.cpp index 68a7f1a99..c63ca9a51 100644 --- a/testtokenize.cpp +++ b/testtokenize.cpp @@ -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()