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

Function test_clone

tests/mesh/test-point-set.cpp:124–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void test_clone( const geode::PointSet3D& point_set )
125{
126 const auto point_set2 = point_set.clone();
127 geode::OpenGeodeMeshException::test(
128 point_set2->nb_vertices() == 3, "PointSet2 should have 3 vertices" );
129
130 const auto attribute =
131 point_set2->vertex_attribute_manager().find_attribute< bool >( "test" );
132 geode::OpenGeodeMeshException::test( attribute->value( 0 ) == true,
133 "PointSet2 attribute value should be true" );
134
135 const geode::Point3D answer{ { 2.1, 9.4, 6.7 } };
136 geode::OpenGeodeMeshException::test( point_set2->point( 2 ) == answer,
137 "PointSet2 vertex coordinates are not correct" );
138}
139
140void test()
141{

Callers 1

testFunction · 0.70

Calls 5

testFunction · 0.70
cloneMethod · 0.45
nb_verticesMethod · 0.45
valueMethod · 0.45
pointMethod · 0.45

Tested by

no test coverage detected