#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;
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);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT(b == false);
+#ifndef wxDONT_TEST
// Conversions from bool type
res = m_anyBool1.GetAs(&l);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT(s == "true");
CPPUNIT_ASSERT(!m_anyBool1.GetAs(&f));
-#endif // !wxDONT_TEST
// Conversions from floating point type
res = m_anyDoubleDouble1.GetAs(&l);
res = s.ToDouble(&d2);
CPPUNIT_ASSERT(res);
CPPUNIT_ASSERT_DOUBLES_EQUAL(d2, TEST_FLOAT_CONST, FEQ_DELTA);
+#endif // !wxDONT_TEST
}