X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9e994615409e36d441135e4fa0761cf0398a2aa..eecb33b0189a3804dead82317a575e0f1d52cd9f:/tests/longlong/longlongtest.cpp?ds=sidebyside diff --git a/tests/longlong/longlongtest.cpp b/tests/longlong/longlongtest.cpp index 93ef095150..5b7920bf87 100644 --- a/tests/longlong/longlongtest.cpp +++ b/tests/longlong/longlongtest.cpp @@ -11,7 +11,7 @@ // headers // ---------------------------------------------------------------------------- -#include "wx/wxprec.h" +#include "testprec.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -24,8 +24,6 @@ #include "wx/longlong.h" #include "wx/timer.h" -#include "wx/cppunit.h" - // ---------------------------------------------------------------------------- // helpers for testing // ---------------------------------------------------------------------------- @@ -242,30 +240,30 @@ void LongLongTestCase::BitOperations() for ( size_t n = 0; n < 33; n++ ) { wxLongLong b(a.GetHi(), a.GetLo()), c, d = b, e; - d >>= n; - c = b >> n; + d >>= n; + c = b >> n; CPPUNIT_ASSERT( c == d ); - d <<= n; - e = c << n; + d <<= n; + e = c << n; CPPUNIT_ASSERT( d == e ); #if wxUSE_LONGLONG_WX wxLongLongWx b1(a.GetHi(), a.GetLo()), c1, d1 = b1, e1; - d1 >>= n; - c1 = b1 >> n; + d1 >>= n; + c1 = b1 >> n; CPPUNIT_ASSERT( c1 == d1 ); - d1 <<= n; - e1 = c1 << n; + d1 <<= n; + e1 = c1 << n; CPPUNIT_ASSERT( d1 == e1 ); #endif #if wxUSE_LONGLONG_NATIVE wxLongLongNative b2(a.GetHi(), a.GetLo()), c2, d2 = b2, e2; - d2 >>= n; - c2 = b2 >> n; + d2 >>= n; + c2 = b2 >> n; CPPUNIT_ASSERT( c2 == d2 ); - d2 <<= n; - e2 = c2 << n; + d2 <<= n; + e2 = c2 << n; CPPUNIT_ASSERT( d2 == e2 ); #endif } @@ -283,6 +281,10 @@ void LongLongTestCase::ToString() s2 = a.ToString(); CPPUNIT_ASSERT( s1 == s2 ); + s2 = wxEmptyString; + s2 << a; + CPPUNIT_ASSERT( s1 == s2 ); + #if wxUSE_LONGLONG_WX wxLongLongWx a1 = testLongs[n]; s2 = a1.ToString();