20#include <boost/test/unit_test.hpp>
43 const std::optional<DOGBONE_RESULT> dogbone_result =
ComputeDogbone(
48 if( dogbone_result.has_value() )
53 const SEG expected_arc_chord =
55 const SEG actual_arc_chord =
59 (actual_arc_chord) ( expected_arc_chord ) );
62 const auto check_updated_seg =
63 [&](
const std::optional<SEG>& updated_seg,
const std::optional<SEG>& expected_seg )
67 if( updated_seg.has_value() )
70 ( *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_REQUIRE_EQUAL(rows.size(), 1)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_AUTO_TEST_CASE(SimpleRightAngleAtOrigin)
static void DoDogboneTestChecks(const DOGBONE_TEST_CASE &aTestCase)
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_PREDICATE(ArePolylineEndPointsNearCircle,(chain)(c.m_geom.m_center_point)(radius)(accuracy+epsilon))
VECTOR2< int32_t > VECTOR2I