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

Function add_corner_collections

tests/model/test-section.cpp:135–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135std::array< geode::uuid, 2 > add_corner_collections(
136 const geode::Section& section, geode::SectionBuilder& builder )
137{
138 std::array< geode::uuid, 2 > uuids;
139 for( auto mb : geode::Range{ 2 } )
140 {
141 uuids[mb] = builder.add_corner_collection();
142 builder.set_corner_collection_name(
143 uuids[mb], absl::StrCat( "collection", mb + 1 ) );
144 }
145 const auto& temp_collection =
146 section.corner_collection( builder.add_corner_collection() );
147 builder.remove_corner_collection( temp_collection );
148 const auto message =
149 absl::StrCat( "Section should have ", 2, " corner collections" );
150 geode::OpenGeodeModelException::test(
151 section.nb_corner_collections() == 2, message );
152 geode::OpenGeodeModelException::test(
153 geode::detail::count_range_elements( section.corner_collections() )
154 == 2,
155 message );
156 geode::OpenGeodeModelException::test(
157 section.corner_collection( uuids[0] ).name() == "collection1",
158 "Wrong CornerCollection name" );
159 return uuids;
160}
161
162std::array< geode::uuid, 2 > add_line_collections(
163 const geode::Section& section, geode::SectionBuilder& builder )

Callers 1

testFunction · 0.70

Calls 8

count_range_elementsFunction · 0.85
nb_corner_collectionsMethod · 0.80
corner_collectionsMethod · 0.80
nameMethod · 0.80
testFunction · 0.70
add_corner_collectionMethod · 0.45

Tested by

no test coverage detected