24#include <boost/test/unit_test.hpp>
47 const std::optional<DOGBONE_RESULT> dogbone_result =
ComputeDogbone(
50 BOOST_REQUIRE_EQUAL( dogbone_result.has_value(), aTestCase.
m_expected_result.has_value() );
52 if( dogbone_result.has_value() )
57 const SEG expected_arc_chord =
59 const SEG actual_arc_chord =
63 (actual_arc_chord) ( expected_arc_chord ) );
66 const auto check_updated_seg =
67 [&](
const std::optional<SEG>& updated_seg,
const std::optional<SEG>& expected_seg )
69 BOOST_REQUIRE_EQUAL( updated_seg.has_value(), expected_seg.has_value() );
71 if( updated_seg.has_value() )
74 ( *updated_seg )( *expected_seg ) );
const VECTOR2I & GetArcMid() const
const VECTOR2I & GetP1() const
const VECTOR2I & GetP0() const
std::optional< DOGBONE_RESULT > ComputeDogbone(const SEG &aSegA, const SEG &aSegB, int aDogboneRadius, bool aAddSlots)
Compute the dogbone geometry for a given line pair and dogbone parameters.
bool SegmentsHaveSameEndPoints(const SEG &aSeg1, const SEG &aSeg2)
Check that two SEGs have the same end points, in either order.
std::optional< SEG > m_updated_seg_b
std::optional< SEG > m_updated_seg_a
Declares the DogboneFixture struct as the boost test fixture.
std::optional< DOGBONE_RESULT > m_expected_result
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(SimpleRightAngleAtOrigin)
static void DoDogboneTestChecks(const DOGBONE_TEST_CASE &aTestCase)
BOOST_AUTO_TEST_SUITE_END()
VECTOR2< int32_t > VECTOR2I