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

Function test_vertex_cycle

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

Source from the content-addressed store, hash-verified

42}
43
44void test_vertex_cycle()
45{
46 const geode::detail::VertexCycle< std::vector< geode::index_t > > cycle1{
47 { 0, 1, 2, 3 }
48 };
49 const geode::detail::VertexCycle< std::vector< geode::index_t > > cycle2{
50 { 2, 3, 0, 1 }
51 };
52 const geode::detail::VertexCycle< std::vector< geode::index_t > > cycle3{
53 { 2, 3, 1, 0 }
54 };
55 const geode::detail::VertexCycle< std::vector< geode::index_t > > cycle4{
56 { 1, 0, 3, 2 }
57 };
58
59 const geode::detail::VertexCycle< std::array< geode::index_t, 2 > > cycle5{
60 { 2, 3 }
61 };
62 const geode::detail::VertexCycle< std::array< geode::index_t, 2 > > cycle6{
63 { 3, 2 }
64 };
65 const geode::detail::VertexCycle< std::array< geode::index_t, 2 > > cycle7{
66 { 3, 1 }
67 };
68
69 geode::OpenGeodeMeshException::test( cycle1 == cycle2,
70 "Wrong result for operator== with cycle1 and cycle2" );
71 geode::OpenGeodeMeshException::test( cycle1 != cycle3,
72 "Wrong result for operator!= with cycle1 and cycle3" );
73 geode::OpenGeodeMeshException::test( cycle1 == cycle4,
74 "Wrong result for operator== with cycle1 and cycle4" );
75 geode::OpenGeodeMeshException::test( cycle5 == cycle6,
76 "Wrong result for operator== with cycle5 and cycle6" );
77 geode::OpenGeodeMeshException::test( cycle5 != cycle7,
78 "Wrong result for operator!= with cycle5 and cycle7" );
79}
80
81void test_oriented_vertex_cycle()
82{

Callers 1

testFunction · 0.85

Calls 1

testFunction · 0.70

Tested by

no test coverage detected