MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / test_foo_constant_attribute

Function test_foo_constant_attribute

tests/basic/test-attribute.cpp:131–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void test_foo_constant_attribute( geode::AttributeManager& manager )
132{
133 auto constant_attribute =
134 manager.find_or_create_attribute< geode::ConstantAttribute, Foo >(
135 "foo_cst", Foo{} );
136 constant_attribute->modify_value( []( Foo& foo ) {
137 foo.double_ = 12.4;
138 } );
139 geode::OpenGeodeBasicException::test(
140 constant_attribute->value().double_ == 12.4,
141 "Should be equal to 12.4" );
142}
143
144void test_foo_variable_attribute( geode::AttributeManager& manager )
145{

Callers 1

testFunction · 0.85

Calls 3

testFunction · 0.70
modify_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected