Update kimath test for recent bugfix.
This commit is contained in:
parent
1d5be1adeb
commit
5bf163de80
|
@ -583,10 +583,10 @@ static const std::vector<ARC_PT_COLLIDE_CASE> arc_pt_collide_cases = {
|
||||||
{ " 270deg, 5 cl, -45 deg, 5 pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 5, { 75, -74 }, false, -1 },
|
{ " 270deg, 5 cl, -45 deg, 5 pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 5, { 75, -74 }, false, -1 },
|
||||||
{ " 270deg, 5 cl, 45 deg, 5 neg", { { 0, 0 }, { 100, 0 }, 270.0 }, 5, { 67, 68 }, true, 5 },
|
{ " 270deg, 5 cl, 45 deg, 5 neg", { { 0, 0 }, { 100, 0 }, 270.0 }, 5, { 67, 68 }, true, 5 },
|
||||||
{ " 270deg, 5 cl, -45 deg, 5 neg", { { 0, 0 }, { 100, 0 }, 270.0 }, 5, { 67, -68 }, false, -1 },
|
{ " 270deg, 5 cl, -45 deg, 5 neg", { { 0, 0 }, { 100, 0 }, 270.0 }, 5, { 67, -68 }, false, -1 },
|
||||||
{ " 270deg, 4 cl, 0 deg pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 4, { 105, 0 }, false, -1 },
|
{ " 270deg, 4 cl, 0 deg pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 4, { 106, 0 }, false, -1 },
|
||||||
{ " 270deg, 4 cl, 90 deg pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 4, { 0, 105 }, false, -1 },
|
{ " 270deg, 4 cl, 90 deg pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 4, { 0, 106 }, false, -1 },
|
||||||
{ " 270deg, 4 cl, 180 deg pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 4, { -105, 0 }, false, -1 },
|
{ " 270deg, 4 cl, 180 deg pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 4, { -106, 0 }, false, -1 },
|
||||||
{ " 270deg, 4 cl, 270 deg pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 4, { 0, -105 }, false, -1 },
|
{ " 270deg, 4 cl, 270 deg pos", { { 0, 0 }, { 100, 0 }, 270.0 }, 4, { 0, -106 }, false, -1 },
|
||||||
{ " 90deg, 0 cl, 0 deg ", { { 0, 0 }, { 71, -71 }, 90.0 }, 0, { 71, -71 }, true, 0 },
|
{ " 90deg, 0 cl, 0 deg ", { { 0, 0 }, { 71, -71 }, 90.0 }, 0, { 71, -71 }, true, 0 },
|
||||||
{ " 90deg, 0 cl, 45 deg ", { { 0, 0 }, { 71, -71 }, 90.0 }, 0, { 100, 0 }, true, 0 },
|
{ " 90deg, 0 cl, 45 deg ", { { 0, 0 }, { 71, -71 }, 90.0 }, 0, { 100, 0 }, true, 0 },
|
||||||
{ " 90deg, 0 cl, 90 deg ", { { 0, 0 }, { 71, -71 }, 90.0 }, 0, { 71, 71 }, true, 0 },
|
{ " 90deg, 0 cl, 90 deg ", { { 0, 0 }, { 71, -71 }, 90.0 }, 0, { 71, 71 }, true, 0 },
|
||||||
|
@ -609,6 +609,8 @@ BOOST_AUTO_TEST_CASE( CollidePt )
|
||||||
SHAPE_ARC arc( c.m_geom.m_center_point, c.m_geom.m_start_point,
|
SHAPE_ARC arc( c.m_geom.m_center_point, c.m_geom.m_start_point,
|
||||||
EDA_ANGLE( c.m_geom.m_center_angle, DEGREES_T ) );
|
EDA_ANGLE( c.m_geom.m_center_angle, DEGREES_T ) );
|
||||||
|
|
||||||
|
if( c.m_arc_clearance > 0 )
|
||||||
|
{
|
||||||
// Test a zero width arc (distance should equal the clearance)
|
// Test a zero width arc (distance should equal the clearance)
|
||||||
BOOST_TEST_CONTEXT( "Test Clearance" )
|
BOOST_TEST_CONTEXT( "Test Clearance" )
|
||||||
{
|
{
|
||||||
|
@ -617,6 +619,7 @@ BOOST_AUTO_TEST_CASE( CollidePt )
|
||||||
c.m_exp_result );
|
c.m_exp_result );
|
||||||
BOOST_CHECK_EQUAL( dist, c.m_exp_distance );
|
BOOST_CHECK_EQUAL( dist, c.m_exp_distance );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Test by changing the width of the arc (distance should equal zero)
|
// Test by changing the width of the arc (distance should equal zero)
|
||||||
BOOST_TEST_CONTEXT( "Test Width" )
|
BOOST_TEST_CONTEXT( "Test Width" )
|
||||||
|
|
Loading…
Reference in New Issue