Move geometry tests into the kimath qa test
This commit is contained in:
parent
6a2a4643d1
commit
019313711a
|
@ -54,14 +54,6 @@ set( common_srcs
|
|||
|
||||
libeval/test_numeric_evaluator.cpp
|
||||
|
||||
geometry/test_fillet.cpp
|
||||
geometry/test_segment.cpp
|
||||
geometry/test_shape_arc.cpp
|
||||
geometry/test_shape_poly_set_collision.cpp
|
||||
geometry/test_shape_poly_set_distance.cpp
|
||||
geometry/test_shape_poly_set_iterator.cpp
|
||||
geometry/test_shape_line_chain.cpp
|
||||
|
||||
view/test_zoom_controller.cpp
|
||||
)
|
||||
|
||||
|
|
|
@ -26,18 +26,28 @@ set( KIMATH_SRCS
|
|||
kimath_test_module.cpp
|
||||
|
||||
test_kimath.cpp
|
||||
|
||||
geometry/test_fillet.cpp
|
||||
geometry/test_segment.cpp
|
||||
geometry/test_shape_arc.cpp
|
||||
geometry/test_shape_poly_set_collision.cpp
|
||||
geometry/test_shape_poly_set_distance.cpp
|
||||
geometry/test_shape_poly_set_iterator.cpp
|
||||
geometry/test_shape_line_chain.cpp
|
||||
)
|
||||
|
||||
add_executable( qa_kimath ${KIMATH_SRCS} )
|
||||
|
||||
target_link_libraries( qa_kimath
|
||||
qa_utils
|
||||
kimath
|
||||
unit_test_utils
|
||||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
target_include_directories( qa_kimath PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/include # Needed for core/optional.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
kicad_add_boost_test( qa_kimath kmath )
|
||||
kicad_add_boost_test( qa_kimath qa_kimath )
|
||||
|
|
|
@ -33,6 +33,15 @@
|
|||
|
||||
#include <unit_test_utils/geometry.h>
|
||||
|
||||
/// Mock up a conversion function
|
||||
constexpr static double IU_PER_MM = 1e3;
|
||||
|
||||
constexpr static inline int Millimeter2iu( double mm )
|
||||
{
|
||||
return (int) ( mm < 0 ? mm * IU_PER_MM - 0.5 : mm * IU_PER_MM + 0.5 );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Declares the Boost test suite fixture.
|
||||
*/
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Main file for the Sexpr tests
|
||||
* Main file for the kimath tests
|
||||
*/
|
||||
#define BOOST_TEST_MODULE KiMath
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
|
Loading…
Reference in New Issue