Prepare propgrid sample to build successfully when wxUSE_LONGLONG is disabled.

Make the code ready to build even when wxLongLong type is not available.
This commit is contained in:
Artur Wieczorek
2015-04-03 21:13:44 +02:00
parent 7c6943175b
commit 726a5e1155
2 changed files with 16 additions and 0 deletions

View File

@@ -671,9 +671,15 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
RT_FAILURE();
#endif
#if wxUSE_LONGLONG && defined(wxLongLong_t)
pgman->SetPropertyValue(wxT("IntProperty"),wxLL(10000000000));
if ( pg->GetPropertyValueAsLongLong(wxT("IntProperty")) != wxLL(10000000000) )
RT_FAILURE();
#else
pgman->SetPropertyValue(wxT("IntProperty"),1000000000);
if ( pg->GetPropertyValueAsLong(wxT("IntProperty")) != 1000000000 )
RT_FAILURE();
#endif
pg->SetPropertyValue(wxT("StringProperty"),wxT("Text2"));
pg->SetPropertyValue(wxT("IntProperty"),512);
@@ -721,9 +727,15 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
RT_FAILURE();
#endif
#if wxUSE_LONGLONG && defined(wxLongLong_t)
pgman->SetPropertyValue(wxT("IntProperty"),wxLL(-80000000000));
if ( pgman->GetPropertyValueAsLongLong(wxT("IntProperty")) != wxLL(-80000000000) )
RT_FAILURE();
#else
pgman->SetPropertyValue(wxT("IntProperty"),-1000000000);
if ( pgman->GetPropertyValueAsLong(wxT("IntProperty")) != -1000000000 )
RT_FAILURE();
#endif
// Make sure children of composite parent get updated as well
// Original string value: "Lamborghini Diablo SV; 5707; [300; 3.9; 8.6] 300000; Not Convertible"