]> git.saurik.com Git - wxWidgets.git/commitdiff
Try to find another wxAny test that results in heap corruption.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 13 May 2013 13:25:44 +0000 (13:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 13 May 2013 13:25:44 +0000 (13:25 +0000)
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

tests/any/anytest.cpp

index ef12511425fe27dc53d9d49b80712fa3dc2c3b87..0d86acaf73adde5960b1bda4570a53235d816c87 100644 (file)
@@ -369,6 +369,7 @@ void wxAnyTestCase::GetAs()
 #endif // !wxDONT_TEST
     CPPUNIT_ASSERT(!m_anyStringString1.GetAs(&b));
 
+#ifndef wxDONT_TEST
     // Let's test some other conversions from string that should work.
     wxAny anyString;
 
@@ -379,11 +380,9 @@ void wxAnyTestCase::GetAs()
     res = anyString.GetAs(&ul);
     CPPUNIT_ASSERT(res);
     CPPUNIT_ASSERT_EQUAL(ul, static_cast<unsigned long>(15));
-#ifndef wxDONT_TEST
     res = anyString.GetAs(&f);
     CPPUNIT_ASSERT(res);
     CPPUNIT_ASSERT_DOUBLES_EQUAL(f, 15.0, FEQ_DELTA);
-#endif // !wxDONT_TEST
     anyString = "TRUE";
     res = anyString.GetAs(&b);
     CPPUNIT_ASSERT(res);
@@ -403,7 +402,6 @@ void wxAnyTestCase::GetAs()
     res = m_anyBool1.GetAs(&s);
     CPPUNIT_ASSERT(res);
     CPPUNIT_ASSERT(s == "true");
-#ifndef wxDONT_TEST
     CPPUNIT_ASSERT(!m_anyBool1.GetAs(&f));
 #endif // !wxDONT_TEST