Go to the source code of this file.
◆ enum_glob
◆ BOOST_AUTO_TEST_CASE() [1/12]
BOOST_AUTO_TEST_CASE |
( |
Init |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [2/12]
BOOST_AUTO_TEST_CASE |
( |
SetGet |
| ) |
|
Definition at line 229 of file test_property.cpp.
232 ptr->Set(
"A", 100 );
233 ptr->Set(
"point", wxPoint( 100, 200 ) );
234 BOOST_CHECK_EQUAL( *ptr->Get<
int>(
"A" ), 100 );
235 BOOST_CHECK_EQUAL( *ptr->Get<wxPoint>(
"point" ), wxPoint( 100, 200 ) );
239 ptr->Set(
"enumClass", D::enum_class::TESTC );
241 BOOST_CHECK_EQUAL( *ptr->Get<
D::enum_class>(
"enumClass" ), D::enum_class::TESTC );
References TEST2.
◆ BOOST_AUTO_TEST_CASE() [3/12]
BOOST_AUTO_TEST_CASE |
( |
VirtualMethods |
| ) |
|
Definition at line 245 of file test_property.cpp.
250 BOOST_CHECK_EQUAL( *ptr->Get<
int>(
"A" ), 23 );
254 BOOST_CHECK_EQUAL( *ptr->Get<
int>(
"A" ), 46 );
◆ BOOST_AUTO_TEST_CASE() [4/12]
BOOST_AUTO_TEST_CASE |
( |
NotexistingProperties |
| ) |
|
Definition at line 258 of file test_property.cpp.
261 BOOST_CHECK_EQUAL( ptr->Set<
int>(
"does not exist", 5 ),
false );
◆ BOOST_AUTO_TEST_CASE() [5/12]
BOOST_AUTO_TEST_CASE |
( |
IncorrectType |
| ) |
|
Definition at line 266 of file test_property.cpp.
269 BOOST_CHECK_THROW( ptr->Get<wxPoint>(
"A" ), std::invalid_argument );
◆ BOOST_AUTO_TEST_CASE() [6/12]
BOOST_AUTO_TEST_CASE |
( |
TypeCasting |
| ) |
|
Definition at line 273 of file test_property.cpp.
277 BOOST_CHECK_EQUAL( D_to_A, dynamic_cast<A*>( ptr ) );
280 BOOST_CHECK_EQUAL( D_to_C, dynamic_cast<C*>( ptr ) );
References TYPE_HASH.
◆ BOOST_AUTO_TEST_CASE() [7/12]
BOOST_AUTO_TEST_CASE |
( |
EnumGlob |
| ) |
|
Definition at line 283 of file test_property.cpp.
292 wxArrayString labels;
293 labels.Add(
"TEST1" );
294 labels.Add(
"TEST2" );
295 labels.Add(
"TEST3" );
297 const wxPGChoices& v = prop->
Choices();
298 BOOST_CHECK_EQUAL( v.GetCount(), values.GetCount() );
299 BOOST_CHECK_EQUAL( v.GetCount(), labels.GetCount() );
301 for (
int i = 0; i < values.GetCount(); ++i )
303 BOOST_CHECK_EQUAL( v.GetValue( i ), values[i] );
306 for (
int i = 0; i < labels.GetCount(); ++i )
308 BOOST_CHECK_EQUAL( v.GetLabel( i ), labels[i] );
virtual bool HasChoices() const
Return true if this PROPERTY has a limited set of possible values.
BOOST_CHECK(v2.Cross(v1)==1)
virtual const wxPGChoices & Choices() const
Return a limited set of possible values (e.g.
References BOOST_CHECK(), PROPERTY_BASE::Choices(), PROPERTY_BASE::HasChoices(), TEST1, TEST2, TEST3, and TYPE_HASH.
◆ BOOST_AUTO_TEST_CASE() [8/12]
BOOST_AUTO_TEST_CASE |
( |
EnumClass |
| ) |
|
Definition at line 312 of file test_property.cpp.
318 values.Add( D::enum_class::TESTA );
319 values.Add( D::enum_class::TESTB );
320 values.Add( D::enum_class::TESTC );
321 wxArrayString labels;
322 labels.Add(
"TESTA" );
323 labels.Add(
"TESTB" );
324 labels.Add(
"TESTC" );
326 const wxPGChoices& v = prop->
Choices();
327 BOOST_CHECK_EQUAL( v.GetCount(), values.GetCount() );
328 BOOST_CHECK_EQUAL( v.GetCount(), labels.GetCount() );
330 for (
int i = 0; i < values.GetCount(); ++i )
332 BOOST_CHECK_EQUAL( v.GetValue( i ), values[i] );
335 for (
int i = 0; i < labels.GetCount(); ++i )
337 BOOST_CHECK_EQUAL( v.GetLabel( i ), labels[i] );
virtual bool HasChoices() const
Return true if this PROPERTY has a limited set of possible values.
BOOST_CHECK(v2.Cross(v1)==1)
virtual const wxPGChoices & Choices() const
Return a limited set of possible values (e.g.
References BOOST_CHECK(), PROPERTY_BASE::Choices(), PROPERTY_BASE::HasChoices(), and TYPE_HASH.
◆ BOOST_AUTO_TEST_CASE() [9/12]
BOOST_AUTO_TEST_CASE |
( |
Availability |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [10/12]
BOOST_AUTO_TEST_CASE |
( |
Alias |
| ) |
|
Definition at line 356 of file test_property.cpp.
360 ptr->Set(
"point", wxPoint( 100, 100 ) );
361 BOOST_CHECK_EQUAL( *ptr->Get<wxPoint>(
"point" ), wxPoint( 100, 100 ) );
362 BOOST_CHECK_EQUAL( *ptr->Get<wxPoint>(
"point_alias" ), wxPoint( 100, 100 ) );
364 ptr->Set(
"point_alias", wxPoint( 300, 300 ) );
365 BOOST_CHECK_EQUAL( *ptr->Get<wxPoint>(
"point" ), wxPoint( 300, 300 ) );
366 BOOST_CHECK_EQUAL( *ptr->Get<wxPoint>(
"point_alias" ), wxPoint( 300, 300 ) );
◆ BOOST_AUTO_TEST_CASE() [11/12]
BOOST_AUTO_TEST_CASE |
( |
Rename |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [12/12]
BOOST_AUTO_TEST_CASE |
( |
AlternativeEnum |
| ) |
|
Definition at line 382 of file test_property.cpp.
390 wxArrayString labels;
394 const wxPGChoices& v = prop->
Choices();
395 BOOST_CHECK_EQUAL( v.GetCount(), values.GetCount() );
396 BOOST_CHECK_EQUAL( v.GetCount(), labels.GetCount() );
398 for (
int i = 0; i < values.GetCount(); ++i )
400 BOOST_CHECK_EQUAL( v.GetValue( i ), values[i] );
403 for (
int i = 0; i < labels.GetCount(); ++i )
405 BOOST_CHECK_EQUAL( v.GetLabel( i ), labels[i] );
virtual bool HasChoices() const
Return true if this PROPERTY has a limited set of possible values.
BOOST_CHECK(v2.Cross(v1)==1)
virtual const wxPGChoices & Choices() const
Return a limited set of possible values (e.g.
References BOOST_CHECK(), PROPERTY_BASE::Choices(), PROPERTY_BASE::HasChoices(), TEST1, TEST3, and TYPE_HASH.
◆ ENUM_TO_WXANY() [1/2]
◆ ENUM_TO_WXANY() [2/2]
◆ _CLASS_A_DESC
◆ _CLASS_B_DESC
◆ _CLASS_C_DESC
◆ _CLASS_D_DESC
◆ _CLASS_E_DESC
◆ _ENUM_GLOB_DESC