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

Function test_oriented_vertex_cycle

tests/mesh/test-vertex-cycle.cpp:81–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void test_oriented_vertex_cycle()
82{
83 const geode::detail::OrientedVertexCycle< std::vector< geode::index_t > >
84 cycle1{ { 0, 1, 2, 3 } };
85 const geode::detail::OrientedVertexCycle< std::vector< geode::index_t > >
86 cycle2{ { 2, 3, 0, 1 } };
87 const geode::detail::OrientedVertexCycle< std::vector< geode::index_t > >
88 cycle3{ { 2, 3, 1, 0 } };
89 const geode::detail::OrientedVertexCycle< std::vector< geode::index_t > >
90 cycle4{ { 1, 0, 3, 2 } };
91
92 const geode::detail::OrientedVertexCycle< std::array< geode::index_t, 2 > >
93 cycle5{ { 2, 3 } };
94 const geode::detail::OrientedVertexCycle< std::array< geode::index_t, 2 > >
95 cycle6{ { 3, 2 } };
96 const geode::detail::OrientedVertexCycle< std::array< geode::index_t, 2 > >
97 cycle7{ { 3, 1 } };
98
99 geode::OpenGeodeMeshException::test( cycle1 == cycle2,
100 "Wrong result for operator== with cycle1 and cycle2" );
101 geode::OpenGeodeMeshException::test( cycle1 != cycle3,
102 "Wrong result for operator== with cycle1 and cycle3" );
103 geode::OpenGeodeMeshException::test( cycle1 != cycle4,
104 "Wrong result for operator!= with cycle1 and cycle4" );
105 geode::OpenGeodeMeshException::test( cycle1.is_opposite( cycle4 ),
106 "Wrong result for is_opposite with cycle1 and cycle4" );
107 geode::OpenGeodeMeshException::test( cycle5 == cycle6,
108 "Wrong result for operator== with cycle5 and cycle6" );
109 geode::OpenGeodeMeshException::test( cycle5 != cycle7,
110 "Wrong result for operator!= with cycle5 and cycle7" );
111}
112
113void test_several_containers()
114{

Callers 1

testFunction · 0.85

Calls 2

testFunction · 0.70
is_oppositeMethod · 0.45

Tested by

no test coverage detected