From 3f1d4a7104e03985c6a249ef001750334ba29510 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 28 Apr 2019 15:59:55 +0200 Subject: [PATCH] Add test of setting/getting wxPGProperty attributes through wxPropertyGridManager --- samples/propgrid/tests.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/samples/propgrid/tests.cpp b/samples/propgrid/tests.cpp index b1262cd31b..9e70fff1ce 100644 --- a/samples/propgrid/tests.cpp +++ b/samples/propgrid/tests.cpp @@ -961,6 +961,19 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) RT_FAILURE(); } + { + RT_START_TEST(Attributes with PGManager) + + const long val = 25; + pgman->SetPropertyAttribute("IntProperty", "Dummy Attribute", val); + if ( pgman->GetPropertyAttribute("IntProperty", "Dummy Attribute").GetLong() != val ) + RT_FAILURE(); + + pgman->SetPropertyAttribute("IntProperty", "Dummy Attribute", wxVariant()); + if ( !pgman->GetPropertyAttribute("IntProperty", "Dummy Attribute").IsNull() ) + RT_FAILURE(); + } + #if WXWIN_COMPATIBILITY_3_0 { RT_START_TEST(DoubleToString)