| 92 | } |
| 93 | |
| 94 | void test_uuid( const geode::Relationships& relations, |
| 95 | const geode::uuid& uuid, |
| 96 | geode::index_t nb_boundaries, |
| 97 | geode::index_t nb_incidences, |
| 98 | geode::index_t nb_internals, |
| 99 | geode::index_t nb_embeddings, |
| 100 | geode::index_t nb_items, |
| 101 | geode::index_t nb_collections ) |
| 102 | { |
| 103 | geode::OpenGeodeModelException::test( |
| 104 | relations.nb_boundaries( uuid ) == nb_boundaries, "", uuid.string(), |
| 105 | " should have ", nb_boundaries, " boundary(ies)" ); |
| 106 | |
| 107 | geode::OpenGeodeModelException::test( |
| 108 | relations.nb_incidences( uuid ) == nb_incidences, "", uuid.string(), |
| 109 | " should have ", nb_incidences, " incidence(s)" ); |
| 110 | |
| 111 | geode::OpenGeodeModelException::test( |
| 112 | relations.nb_internals( uuid ) == nb_internals, "", uuid.string(), |
| 113 | " should have ", nb_internals, " internal component(s)" ); |
| 114 | |
| 115 | geode::OpenGeodeModelException::test( |
| 116 | relations.nb_embeddings( uuid ) == nb_embeddings, "", uuid.string(), |
| 117 | " should have ", nb_embeddings, " embedding(s)" ); |
| 118 | |
| 119 | geode::OpenGeodeModelException::test( |
| 120 | relations.nb_items( uuid ) == nb_items, "", uuid.string(), |
| 121 | " should have ", nb_boundaries, " item(s)" ); |
| 122 | |
| 123 | geode::OpenGeodeModelException::test( |
| 124 | relations.nb_collections( uuid ) == nb_collections, "", uuid.string(), |
| 125 | " should have ", nb_collections, " collection(s)" ); |
| 126 | |
| 127 | const auto total = nb_boundaries + nb_incidences + nb_internals |
| 128 | + nb_embeddings + nb_items + nb_collections; |
| 129 | geode::OpenGeodeModelException::test( |
| 130 | relations.nb_relations( uuid ) == total, "", uuid.string(), |
| 131 | " should have ", total, " relation(s)" ); |
| 132 | } |
| 133 | |
| 134 | void test_relations( const geode::Relationships& relations, |
| 135 | absl::Span< const geode::uuid > uuids ) |
no test coverage detected