]> git.saurik.com Git - wxWidgets.git/commitdiff
Use CPPUNIT_ASSERT_EQUAL where possible to improve messages.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Wed, 30 Aug 2006 08:39:06 +0000 (08:39 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Wed, 30 Aug 2006 08:39:06 +0000 (08:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/strings/vsnprintf.cpp

index a0e073be705009e63708cf97b8b2a0695d0d0c73..70f7b1296129e687658c90321ab8bbf94f9ba93d 100644 (file)
@@ -35,7 +35,7 @@ static wxChar buf[MAX_TEST_LEN];
 // these macros makes it possible to write all tests without repeating a lot of times wxT() macro
 
 #define ASSERT_STR_EQUAL( a, b ) \
-    CPPUNIT_ASSERT( wxString(a) == wxString(b) );
+    CPPUNIT_ASSERT_EQUAL( wxString(a), wxString(b) );
 
 #define CMP5(expected, x, y, z, w)                  \
     wxSnprintf(buf, MAX_TEST_LEN, wxT(x), y, z, w); \
@@ -57,10 +57,11 @@ static wxChar buf[MAX_TEST_LEN];
                                                     \
     ASSERT_STR_EQUAL( wxT(expected), buf );
 
-#define CMPTOSIZE(buffer, size, expected, fmt, x, y, z, w)  \
-    wxSnprintf(buffer, size, wxT(fmt), x, y, z, w);         \
-                                                            \
-    CPPUNIT_ASSERT( wxString(wxT(expected)).Left(size - 1) == buffer )
+#define CMPTOSIZE(buffer, size, expected, fmt, x, y, z, w)          \
+    wxSnprintf(buffer, size, wxT(fmt), x, y, z, w);                 \
+                                                                    \
+    CPPUNIT_ASSERT_EQUAL( wxString(wxT(expected)).Left(size - 1),   \
+                          wxString(buffer) )