From 913ede45aa2709952ca3c4fddd5903295a8f976b Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Tue, 12 Jan 2010 21:24:44 +0200 Subject: [PATCH] Get rid of casting in test file. http://sourceforge.net/apps/trac/cppcheck/ticket/1242 --- test/testtoken.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/testtoken.cpp b/test/testtoken.cpp index 5cb411b1c..b3340213a 100644 --- a/test/testtoken.cpp +++ b/test/testtoken.cpp @@ -22,10 +22,6 @@ #include -#ifdef __BORLANDC__ -#include // intptr_t -#endif - extern std::ostringstream errout; class TestTOKEN : public TestFixture { @@ -121,9 +117,9 @@ private: Token *tokensBack = 0; Token tok(&tokensBack); tok.insertToken("aba"); - ASSERT_EQUALS((intptr_t)tok.next(), (intptr_t)tokensBack); + ASSERT_EQUALS(true, tokensBack == tok.next()); tok.deleteNext(); - ASSERT_EQUALS((intptr_t)&tok, (intptr_t)tokensBack); + ASSERT_EQUALS(true, tokensBack == &tok); } };