Correctly use wxANY_AS() instead of wxAny::As<>(), for VC6 compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -514,7 +514,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
|||||||
wxDateTime testTime = wxDateTime::Now();
|
wxDateTime testTime = wxDateTime::Now();
|
||||||
any = testTime;
|
any = testTime;
|
||||||
prop->SetValue(any);
|
prop->SetValue(any);
|
||||||
if ( prop->GetValue().GetAny().As<wxDateTime>() != testTime )
|
if ( wxANY_AS(prop->GetValue().GetAny(), wxDateTime) != testTime )
|
||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -522,10 +522,10 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
|||||||
int testInt = 25537983;
|
int testInt = 25537983;
|
||||||
any = testInt;
|
any = testInt;
|
||||||
prop->SetValue(any);
|
prop->SetValue(any);
|
||||||
if ( prop->GetValue().GetAny().As<int>() != testInt )
|
if ( wxANY_AS(prop->GetValue().GetAny(), int) != testInt )
|
||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
#ifdef wxLongLong_t
|
#ifdef wxLongLong_t
|
||||||
if ( prop->GetValue().GetAny().As<wxLongLong_t>() != testInt )
|
if ( wxANY_AS(prop->GetValue().GetAny(), wxLongLong_t) != testInt )
|
||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
|||||||
wxString testString = "asd934jfyn3";
|
wxString testString = "asd934jfyn3";
|
||||||
any = testString;
|
any = testString;
|
||||||
prop->SetValue(any);
|
prop->SetValue(any);
|
||||||
if ( prop->GetValue().GetAny().As<wxString>() != testString )
|
if ( wxANY_AS(prop->GetValue().GetAny(), wxString) != testString )
|
||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
|
|
||||||
// Test with a type generated with IMPLEMENT_VARIANT_OBJECT()
|
// Test with a type generated with IMPLEMENT_VARIANT_OBJECT()
|
||||||
@@ -541,7 +541,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
|||||||
wxColour testCol = *wxCYAN;
|
wxColour testCol = *wxCYAN;
|
||||||
any = testCol;
|
any = testCol;
|
||||||
prop->SetValue(any);
|
prop->SetValue(any);
|
||||||
if ( prop->GetValue().GetAny().As<wxColour>() != testCol )
|
if ( wxANY_AS(prop->GetValue().GetAny(), wxColour) != testCol )
|
||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
|
|
||||||
// Test with a type with custom wxVariantData defined by
|
// Test with a type with custom wxVariantData defined by
|
||||||
@@ -550,7 +550,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
|
|||||||
wxPoint testPoint(199, 199);
|
wxPoint testPoint(199, 199);
|
||||||
any = testPoint;
|
any = testPoint;
|
||||||
prop->SetValue(any);
|
prop->SetValue(any);
|
||||||
if ( prop->GetValue().GetAny().As<wxPoint>() != testPoint )
|
if ( wxANY_AS(prop->GetValue().GetAny(), wxPoint) != testPoint )
|
||||||
RT_FAILURE();
|
RT_FAILURE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user