Conversion to float is not the only problem...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73975
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#endif // !wxDONT_TEST
CPPUNIT_ASSERT(!m_anyStringString1.GetAs(&b));
#endif // !wxDONT_TEST
CPPUNIT_ASSERT(!m_anyStringString1.GetAs(&b));
// Let's test some other conversions from string that should work.
wxAny anyString;
// Let's test some other conversions from string that should work.
wxAny anyString;
res = anyString.GetAs(&ul);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT_EQUAL(ul, static_cast<unsigned long>(15));
res = anyString.GetAs(&ul);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT_EQUAL(ul, static_cast<unsigned long>(15));
res = anyString.GetAs(&f);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT_DOUBLES_EQUAL(f, 15.0, FEQ_DELTA);
res = anyString.GetAs(&f);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT_DOUBLES_EQUAL(f, 15.0, FEQ_DELTA);
anyString = "TRUE";
res = anyString.GetAs(&b);
CPPUNIT_ASSERT(res);
anyString = "TRUE";
res = anyString.GetAs(&b);
CPPUNIT_ASSERT(res);
res = m_anyBool1.GetAs(&s);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT(s == "true");
res = m_anyBool1.GetAs(&s);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT(s == "true");
CPPUNIT_ASSERT(!m_anyBool1.GetAs(&f));
#endif // !wxDONT_TEST
CPPUNIT_ASSERT(!m_anyBool1.GetAs(&f));
#endif // !wxDONT_TEST