QA: Account for eeschema tests unit rounding
This commit is contained in:
parent
8e75f6029c
commit
9a41fd060b
|
@ -31,6 +31,8 @@
|
|||
#include <qa_utils/geometry/poly_set_construction.h>
|
||||
#include <qa_utils/geometry/seg_construction.h>
|
||||
|
||||
#include <unit_test_utils/geometry.h>
|
||||
|
||||
/**
|
||||
* Declares the Boost test suite fixture.
|
||||
*/
|
||||
|
@ -141,7 +143,7 @@ BOOST_AUTO_TEST_CASE( SegDistance )
|
|||
int dist = polyset.Distance( c.m_seg, c.m_seg_width );
|
||||
|
||||
// right answer?
|
||||
BOOST_CHECK_EQUAL( dist, c.m_exp_dist );
|
||||
BOOST_CHECK_PREDICATE( KI_TEST::IsWithin<int>, ( dist )( c.m_exp_dist )( 1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*
|
||||
* TODO: convert to boost_test_print_type when Boost minver > 1.64
|
||||
*/
|
||||
std::ostream& operator<<( std::ostream& os, const BOX2I& aBox )
|
||||
inline std::ostream& operator<<( std::ostream& os, const BOX2I& aBox )
|
||||
{
|
||||
os << "BOX[ " << aBox.GetOrigin() << " + " << aBox.GetSize() << " ]";
|
||||
return os;
|
||||
|
|
Loading…
Reference in New Issue