X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3778b4d9c7eebc39f496a9dd055638e06fb9140..c75400ea2210374c6ef36f3b02b1e49c20f3ab54:/tests/strings/vararg.cpp diff --git a/tests/strings/vararg.cpp b/tests/strings/vararg.cpp index 56582e9a67..14fb85ff94 100644 --- a/tests/strings/vararg.cpp +++ b/tests/strings/vararg.cpp @@ -39,6 +39,9 @@ private: CPPUNIT_TEST( CharPrintf ); #if wxUSE_STD_STRING CPPUNIT_TEST( StdString ); +#endif +#if wxUSE_LONGLONG + CPPUNIT_TEST( LongLongPrintf ); #endif CPPUNIT_TEST( Sscanf ); CPPUNIT_TEST( RepeatedPrintf ); @@ -49,6 +52,9 @@ private: void CharPrintf(); #if wxUSE_STD_STRING void StdString(); +#endif +#if wxUSE_LONGLONG + void LongLongPrintf(); #endif void Sscanf(); void RepeatedPrintf(); @@ -152,6 +158,18 @@ void VarArgTestCase::StdString() } #endif // wxUSE_STD_STRING +#if wxUSE_LONGLONG +void VarArgTestCase::LongLongPrintf() +{ + const char * const llfmt = "%" wxLongLongFmtSpec "d"; + + CPPUNIT_ASSERT_EQUAL( "17", wxString::Format(llfmt, wxLL(17)) ); + + wxLongLong ll = 1234567890; + CPPUNIT_ASSERT_EQUAL( "1234567890", wxString::Format(llfmt, ll) ); +} +#endif // wxUSE_LONGLONG + void VarArgTestCase::Sscanf() { int i = 0;