]> git.saurik.com Git - wxWidgets.git/commitdiff
allow using CPPUNIT_ASSERT_EQUAL(int, wxFileOffset) too
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 4 Jan 2009 00:47:10 +0000 (00:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 4 Jan 2009 00:47:10 +0000 (00:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cppunit.h
tests/streams/bstream.h

index 59f79b831da3b66966b24be12d456fc75fba2276..f2be3355f6fc38c2de0e1b2c98cd7686ec5ec9c3 100644 (file)
@@ -124,6 +124,7 @@ assertEquals(const wchar_t *expected,
 // and another to be able to specify (usually literal) ints as expected values
 // for functions returning size_t
 WX_CPPUNIT_ASSERT_EQUALS(int, size_t)
+WX_CPPUNIT_ASSERT_EQUALS(int, wxFileOffset)
 
 // special section with VC6 workarounds: due to incorrect resolution of
 // overloaded/template functions in this compiler (it basically doesn't use the
@@ -133,6 +134,7 @@ WX_CPPUNIT_ASSERT_EQUALS(int, size_t)
 
 WX_CPPUNIT_ASSERT_EQUALS(int, int)
 WX_CPPUNIT_ASSERT_EQUALS(size_t, size_t)
+WX_CPPUNIT_ASSERT_EQUALS(wxFileOffset, wxFileOffset)
 
 #endif // VC6
 
index 1f015314e309532f6502656a87ab837490bf8079..3f5e1f1d591326805f626a463e001792b40c4e28 100644 (file)
@@ -203,8 +203,8 @@ protected:
         // Try to Seek in the stream...
         // Note: streams not supporting this should register this test
         //       with CPPUNIT_TEST_FAIL instead of CPPUNIT_TEST.
-        CPPUNIT_ASSERT_EQUAL(wxFileOffset(2), stream_in.SeekI(2, wxFromStart));
-        CPPUNIT_ASSERT_EQUAL(wxFileOffset(4), stream_in.SeekI(2, wxFromCurrent));
+        CPPUNIT_ASSERT_EQUAL(2, stream_in.SeekI(2, wxFromStart));
+        CPPUNIT_ASSERT_EQUAL(4, stream_in.SeekI(2, wxFromCurrent));
         // Not sure the following line is correct, so test it differently.
         //CPPUNIT_ASSERT_EQUAL(stream_in.GetSize()-2, stream_in.SeekI(-2, wxFromEnd));
         CPPUNIT_ASSERT(stream_in.SeekI(-2, wxFromEnd) != wxInvalidOffset);
@@ -275,7 +275,7 @@ protected:
 
         if (stream_in.Ungetch('a'))
         {
-            CPPUNIT_ASSERT_EQUAL('a', stream_in.GetC());
+            CPPUNIT_ASSERT_EQUAL(int('a'), stream_in.GetC());
         }
     }