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

Function test_create_vertices

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

Source from the content-addressed store, hash-verified

39#include <geode/tests/common.hpp>
40
41void test_create_vertices(
42 const geode::PointSet3D& point_set, geode::PointSetBuilder3D& builder )
43{
44 builder.create_point( geode::Point3D{ { 0.1, 0.2, 0.3 } } );
45 builder.create_point( geode::Point3D{ { 2.1, 9.4, 6.7 } } );
46 geode::OpenGeodeMeshException::test(
47 point_set.nb_vertices() == 2, "PointSet should have 2 vertices" );
48 builder.create_vertices( 2 );
49 geode::OpenGeodeMeshException::test(
50 point_set.nb_vertices() == 4, "PointSet should have 4 vertices" );
51 geode::OpenGeodeMeshException::test(
52 point_set.point( 2 ) == geode::Point3D(),
53 "Default coordinates are not correct" );
54 builder.set_point( 2, geode::Point3D{ { 2.3, 5.0, -1.2 } } );
55 geode::OpenGeodeMeshException::test(
56 point_set.point( 2 ) == geode::Point3D( { 2.3, 5.0, -1.2 } ),
57 "Point coordinates have not been correctly set" );
58}
59
60void test_permutation(
61 const geode::PointSet3D& point_set, geode::PointSetBuilder3D& builder )

Callers 1

testFunction · 0.70

Calls 6

create_verticesMethod · 0.80
testFunction · 0.70
create_pointMethod · 0.45
nb_verticesMethod · 0.45
pointMethod · 0.45
set_pointMethod · 0.45

Tested by

no test coverage detected