diff --git a/samples/propgrid/tests.cpp b/samples/propgrid/tests.cpp index 6387b62ba3..19c18728e8 100644 --- a/samples/propgrid/tests.cpp +++ b/samples/propgrid/tests.cpp @@ -514,7 +514,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxDateTime testTime = wxDateTime::Now(); any = testTime; prop->SetValue(any); - if ( prop->GetValue().GetAny().As() != testTime ) + if ( wxANY_AS(prop->GetValue().GetAny(), wxDateTime) != testTime ) RT_FAILURE(); #endif @@ -522,10 +522,10 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) int testInt = 25537983; any = testInt; prop->SetValue(any); - if ( prop->GetValue().GetAny().As() != testInt ) + if ( wxANY_AS(prop->GetValue().GetAny(), int) != testInt ) RT_FAILURE(); #ifdef wxLongLong_t - if ( prop->GetValue().GetAny().As() != testInt ) + if ( wxANY_AS(prop->GetValue().GetAny(), wxLongLong_t) != testInt ) RT_FAILURE(); #endif @@ -533,7 +533,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxString testString = "asd934jfyn3"; any = testString; prop->SetValue(any); - if ( prop->GetValue().GetAny().As() != testString ) + if ( wxANY_AS(prop->GetValue().GetAny(), wxString) != testString ) RT_FAILURE(); // Test with a type generated with IMPLEMENT_VARIANT_OBJECT() @@ -541,7 +541,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxColour testCol = *wxCYAN; any = testCol; prop->SetValue(any); - if ( prop->GetValue().GetAny().As() != testCol ) + if ( wxANY_AS(prop->GetValue().GetAny(), wxColour) != testCol ) RT_FAILURE(); // Test with a type with custom wxVariantData defined by @@ -550,7 +550,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxPoint testPoint(199, 199); any = testPoint; prop->SetValue(any); - if ( prop->GetValue().GetAny().As() != testPoint ) + if ( wxANY_AS(prop->GetValue().GetAny(), wxPoint) != testPoint ) RT_FAILURE(); }