| 300 | } |
| 301 | |
| 302 | void test_bool_variable_attribute( geode::AttributeManager& manager ) |
| 303 | { |
| 304 | auto variable_attribute = |
| 305 | manager.find_or_create_attribute< geode::VariableAttribute, bool >( |
| 306 | "bool_var", false, { true, true } ); |
| 307 | geode::OpenGeodeBasicException::test( |
| 308 | variable_attribute->default_value() == false, "Wrong default value" ); |
| 309 | variable_attribute->set_value( 3, true ); |
| 310 | |
| 311 | const auto attribute = manager.find_attribute< bool >( "bool_var" ); |
| 312 | geode::OpenGeodeBasicException::test( |
| 313 | attribute->value( 3 ), "Should be equal to true" ); |
| 314 | |
| 315 | variable_attribute->set_value( 3, false ); |
| 316 | geode::OpenGeodeBasicException::test( |
| 317 | !attribute->value( 3 ), "Should be equal to false" ); |
| 318 | } |
| 319 | |
| 320 | bool managers_have_same_attributes( const geode::AttributeManager& manager, |
| 321 | const geode::AttributeManager& reloaded_manager ) |
no test coverage detected