From 31c22ca31e459f5f7459f2321950070389ed710c Mon Sep 17 00:00:00 2001 From: makulik Date: Wed, 30 Nov 2011 21:51:23 +0100 Subject: [PATCH 1/2] Fixed preprocessor testcases Signed-off-by: makulik --- test/testpreprocessor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 7544cd209..16188dfac 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -3058,7 +3058,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1, (int)actual.size()); + ASSERT_EQUALS(1U, (int)actual.size()); ASSERT_EQUALS("\n\n\n", actual[""]); } @@ -3078,7 +3078,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1, (int)actual.size()); + ASSERT_EQUALS(1U, (int)actual.size()); ASSERT_EQUALS("\nFred & Wilma\n\n", actual[""]); } @@ -3099,7 +3099,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1, (int)actual.size()); + ASSERT_EQUALS(1U, (int)actual.size()); ASSERT_EQUALS("\n\n\n\n", actual[""]); } @@ -3120,7 +3120,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1, (int)actual.size()); + ASSERT_EQUALS(1U, (int)actual.size()); ASSERT_EQUALS("\n\n\n\n", actual[""]); } @@ -3141,7 +3141,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1, (int)actual.size()); + ASSERT_EQUALS(1U, (int)actual.size()); ASSERT_EQUALS("\n\n\n\n", actual[""]); } @@ -3164,7 +3164,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1, (int)actual.size()); + ASSERT_EQUALS(1U, (int)actual.size()); TODO_ASSERT_EQUALS("\n\n\nBarney & Betty\n\n","\n\n\n\n\n", actual[""]); } @@ -3183,7 +3183,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1, (int)actual.size()); + ASSERT_EQUALS(1U, (int)actual.size()); TODO_ASSERT_EQUALS("\n;\n","\nXDefined;\n", actual[""]); } }; From 8c04431b17d0c9f4bbe622e7d23ea01198a2edbb Mon Sep 17 00:00:00 2001 From: makulik Date: Wed, 30 Nov 2011 22:10:49 +0100 Subject: [PATCH 2/2] Removed int cast from undef preprocessor testcases Signed-off-by: makulik --- test/testpreprocessor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 16188dfac..7cf434d12 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -3058,7 +3058,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1U, (int)actual.size()); + ASSERT_EQUALS(1U, actual.size()); ASSERT_EQUALS("\n\n\n", actual[""]); } @@ -3078,7 +3078,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1U, (int)actual.size()); + ASSERT_EQUALS(1U, actual.size()); ASSERT_EQUALS("\nFred & Wilma\n\n", actual[""]); } @@ -3099,7 +3099,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1U, (int)actual.size()); + ASSERT_EQUALS(1U, actual.size()); ASSERT_EQUALS("\n\n\n\n", actual[""]); } @@ -3120,7 +3120,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1U, (int)actual.size()); + ASSERT_EQUALS(1U, actual.size()); ASSERT_EQUALS("\n\n\n\n", actual[""]); } @@ -3141,7 +3141,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1U, (int)actual.size()); + ASSERT_EQUALS(1U, actual.size()); ASSERT_EQUALS("\n\n\n\n", actual[""]); } @@ -3164,7 +3164,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1U, (int)actual.size()); + ASSERT_EQUALS(1U, actual.size()); TODO_ASSERT_EQUALS("\n\n\nBarney & Betty\n\n","\n\n\n\n\n", actual[""]); } @@ -3183,7 +3183,7 @@ private: preprocessor.preprocess(istr, actual, "file.c"); // Compare results.. - ASSERT_EQUALS(1U, (int)actual.size()); + ASSERT_EQUALS(1U, actual.size()); TODO_ASSERT_EQUALS("\n;\n","\nXDefined;\n", actual[""]); } };