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

Function test_uuid

tests/model/test-relationships.cpp:94–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void 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
134void test_relations( const geode::Relationships& relations,
135 absl::Span< const geode::uuid > uuids )

Callers 1

test_relationsFunction · 0.85

Calls 9

nb_boundariesMethod · 0.80
nb_incidencesMethod · 0.80
nb_internalsMethod · 0.80
nb_embeddingsMethod · 0.80
nb_collectionsMethod · 0.80
testFunction · 0.70
stringMethod · 0.45
nb_itemsMethod · 0.45
nb_relationsMethod · 0.45

Tested by

no test coverage detected