| 155 | } |
| 156 | |
| 157 | void test_attributes( const geode::Relationships& relations, |
| 158 | absl::Span< const geode::uuid > uuids ) |
| 159 | { |
| 160 | geode::OpenGeodeModelException::test( |
| 161 | relations.relation_index( uuids[0], uuids[1] ) == 0, |
| 162 | "Wrong relation index from uuids" ); |
| 163 | const auto output = relations.relation_from_index( 0 ); |
| 164 | geode::OpenGeodeModelException::test( |
| 165 | std::get< 0 >( output ).id() == uuids[1], |
| 166 | "Wrong relation uuids from index" ); |
| 167 | geode::OpenGeodeModelException::test( |
| 168 | std::get< 1 >( output ).id() == uuids[0], |
| 169 | "Wrong relation uuids from index" ); |
| 170 | auto relation_att = |
| 171 | relations.relation_attribute_manager() |
| 172 | .find_or_create_attribute< geode::VariableAttribute, int >( |
| 173 | "int", 0 ); |
| 174 | relation_att->set_value( 0, 1 ); |
| 175 | geode::OpenGeodeModelException::test( |
| 176 | relation_att->value( |
| 177 | relations.relation_index( uuids[0], uuids[1] ).value() ) |
| 178 | == 1, |
| 179 | "Wrong relation attribute assignment" ); |
| 180 | } |
| 181 | |
| 182 | void test_io( |
| 183 | std::string_view directory, absl::Span< const geode::uuid > uuids ) |
no test coverage detected