git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42586
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
static const struct ToLongData
{
const wxChar *str;
static const struct ToLongData
{
const wxChar *str;
- wxLongLong_t llvalue;
- wxULongLong_t ullvalue;
+ wxLongLong_t value;
+#else
+ long value;
- long lvalue;
- unsigned long ulvalue;
- };
-
+ long LValue() const { return value; }
+ unsigned long ULValue() const { return value; }
+#ifdef wxLongLong_t
+ wxLongLong_t LLValue() const { return value; }
+ wxULongLong_t ULLValue() const { return (wxULongLong_t)value; }
+#endif // wxLongLong_t
+
bool IsOk() const { return !(flags & Number_Invalid); }
} longData[] =
{
bool IsOk() const { return !(flags & Number_Invalid); }
} longData[] =
{
CPPUNIT_ASSERT_EQUAL( ld.IsOk(), wxString(ld.str).ToLong(&l) );
if ( ld.IsOk() )
CPPUNIT_ASSERT_EQUAL( ld.IsOk(), wxString(ld.str).ToLong(&l) );
if ( ld.IsOk() )
- CPPUNIT_ASSERT_EQUAL( ld.lvalue, l );
+ CPPUNIT_ASSERT_EQUAL( ld.LValue(), l );
CPPUNIT_ASSERT_EQUAL( ld.IsOk(), wxString(ld.str).ToULong(&ul) );
if ( ld.IsOk() )
CPPUNIT_ASSERT_EQUAL( ld.IsOk(), wxString(ld.str).ToULong(&ul) );
if ( ld.IsOk() )
- CPPUNIT_ASSERT_EQUAL( ld.ulvalue, ul );
+ CPPUNIT_ASSERT_EQUAL( ld.ULValue(), ul );
CPPUNIT_ASSERT_EQUAL( ld.IsOk(), wxString(ld.str).ToLongLong(&l) );
if ( ld.IsOk() )
CPPUNIT_ASSERT_EQUAL( ld.IsOk(), wxString(ld.str).ToLongLong(&l) );
if ( ld.IsOk() )
- CPPUNIT_ASSERT_EQUAL( ld.llvalue, l );
+ CPPUNIT_ASSERT_EQUAL( ld.LLValue(), l );
CPPUNIT_ASSERT_EQUAL( ld.IsOk(), wxString(ld.str).ToULongLong(&ul) );
if ( ld.IsOk() )
CPPUNIT_ASSERT_EQUAL( ld.IsOk(), wxString(ld.str).ToULongLong(&ul) );
if ( ld.IsOk() )
- CPPUNIT_ASSERT_EQUAL( ld.ullvalue, ul );
+ CPPUNIT_ASSERT_EQUAL( ld.ULLValue(), ul );