qa: merge unit_test_utils to qa_utils

This commit is contained in:
Sylwester Kocjan 2021-02-06 23:20:31 +01:00 committed by Ian McInerney
parent be3a08bfa7
commit 31da3e7dc6
81 changed files with 103 additions and 149 deletions

View File

@ -44,7 +44,6 @@ endif()
# Shared QA helper libraries # Shared QA helper libraries
add_subdirectory( qa_utils ) add_subdirectory( qa_utils )
add_subdirectory( pcbnew_utils ) add_subdirectory( pcbnew_utils )
add_subdirectory( unit_test_utils )
# Unit tests # Unit tests
add_subdirectory( common ) add_subdirectory( common )

View File

@ -55,7 +55,6 @@ set( common_libs
common common
gal gal
qa_utils qa_utils
unit_test_utils
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
) )

View File

@ -31,7 +31,7 @@
#include <gal/color4d.h> #include <gal/color4d.h>
#include <unit_test_utils/numeric.h> #include <qa_utils/numeric.h>
namespace KI_TEST namespace KI_TEST
{ {
@ -61,4 +61,4 @@ inline bool IsColorNearHex( const KIGFX::COLOR4D& aCol, unsigned char r, unsigne
} }
} // namespace KI_TEST } // namespace KI_TEST
#endif // QA_COMMON_COLOR4D_TEST_UTILS__H #endif // QA_COMMON_COLOR4D_TEST_UTILS__H

View File

@ -26,7 +26,7 @@
* Test suite for #NUMERIC_EVALUATOR * Test suite for #NUMERIC_EVALUATOR
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <libeval/numeric_evaluator.h> #include <libeval/numeric_evaluator.h>

View File

@ -26,7 +26,7 @@
* Test suite for #ALTIUM_PARSER * Test suite for #ALTIUM_PARSER
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <common/plugins/altium/altium_parser.h> #include <common/plugins/altium/altium_parser.h>

View File

@ -26,7 +26,7 @@
* Test suite for #ALTIUM_PARSER * Test suite for #ALTIUM_PARSER
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <common/plugins/altium/altium_parser_utils.h> #include <common/plugins/altium/altium_parser_utils.h>

View File

@ -26,7 +26,7 @@
* Test suite for #ARRAY_AXIS * Test suite for #ARRAY_AXIS
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <array_axis.h> #include <array_axis.h>
@ -221,4 +221,4 @@ BOOST_AUTO_TEST_CASE( Numbering )
} }
} }
BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()

View File

@ -26,8 +26,8 @@
* Test suite for #ARRAY_OPTIONS * Test suite for #ARRAY_OPTIONS
*/ */
#include <unit_test_utils/geometry.h> #include <qa_utils/geometry/geometry.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <base_units.h> #include <base_units.h>
#include <trigo.h> #include <trigo.h>
@ -509,4 +509,4 @@ BOOST_AUTO_TEST_CASE( GridNaming )
} }
} }
BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()

View File

@ -26,7 +26,7 @@
* Test suite for BITMAP_BASE * Test suite for BITMAP_BASE
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <bitmap_base.h> #include <bitmap_base.h>

View File

@ -25,7 +25,7 @@
#include "color4d_test_utils.h" #include "color4d_test_utils.h"
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <gal/color4d.h> #include <gal/color4d.h>

View File

@ -29,7 +29,7 @@
* test utility. * test utility.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <tool/coroutine.h> #include <tool/coroutine.h>
@ -174,4 +174,4 @@ BOOST_AUTO_TEST_CASE( Increment )
received_events.begin(), received_events.end(), exp_events.begin(), exp_events.end() ); received_events.begin(), received_events.end(), exp_events.begin(), exp_events.end() );
} }
BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <base_units.h> #include <base_units.h>

View File

@ -26,7 +26,7 @@
* Test suite for general string functions * Test suite for general string functions
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <kicad_string.h> #include <kicad_string.h>

View File

@ -30,7 +30,7 @@
* own logic should be done in the relevant tests. * own logic should be done in the relevant tests.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <lib_table_base.h> #include <lib_table_base.h>

View File

@ -18,7 +18,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <wx/gdicmn.h> // wxPoint #include <wx/gdicmn.h> // wxPoint
#include <inspectable.h> #include <inspectable.h>

View File

@ -26,7 +26,7 @@
* Test suite for refdes functions * Test suite for refdes functions
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <refdes_utils.h> #include <refdes_utils.h>
@ -98,4 +98,4 @@ BOOST_AUTO_TEST_CASE( RefDesComp )
} }
BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <title_block.h> #include <title_block.h>

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <utf8.h> #include <utf8.h>

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>

View File

@ -26,7 +26,7 @@
* Test suite for WX_FILNAME * Test suite for WX_FILNAME
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <wx_filename.h> #include <wx_filename.h>
@ -126,4 +126,4 @@ BOOST_AUTO_TEST_CASE( Split )
} }
} }
BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END()

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <view/zoom_controller.h> #include <view/zoom_controller.h>

View File

@ -24,7 +24,7 @@
#ifndef QA_COMMON_WXIMAGE_TEST_UTILS__H #ifndef QA_COMMON_WXIMAGE_TEST_UTILS__H
#define QA_COMMON_WXIMAGE_TEST_UTILS__H #define QA_COMMON_WXIMAGE_TEST_UTILS__H
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <wx/image.h> #include <wx/image.h>
@ -56,4 +56,4 @@ struct print_log_value<wxImage>
} // namespace BOOST_TEST_PRINT_NAMESPACE_OPEN } // namespace BOOST_TEST_PRINT_NAMESPACE_OPEN
BOOST_TEST_PRINT_NAMESPACE_CLOSE BOOST_TEST_PRINT_NAMESPACE_CLOSE
#endif #endif

View File

@ -98,7 +98,6 @@ target_link_libraries( drc_proto
tinyspline_lib tinyspline_lib
nanosvg nanosvg
idf3 idf3
unit_test_utils
${PCBNEW_IO_LIBRARIES} ${PCBNEW_IO_LIBRARIES}
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES} ${GDI_PLUS_LIBRARIES}

View File

@ -90,7 +90,6 @@ target_link_libraries( qa_eeschema
pcbcommon pcbcommon
kimath kimath
qa_utils qa_utils
unit_test_utils
markdown_lib markdown_lib
${GDI_PLUS_LIBRARIES} ${GDI_PLUS_LIBRARIES}
${Boost_LIBRARIES} ${Boost_LIBRARIES}

View File

@ -29,7 +29,7 @@
#ifndef QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H #ifndef QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H
#define QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H #define QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <template_fieldnames.h> #include <template_fieldnames.h>
@ -117,4 +117,4 @@ bool AreDefaultFieldsCorrect( const std::vector<LIB_FIELD>& aFields )
} // namespace KI_TEST } // namespace KI_TEST
#endif // QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H #endif // QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H

View File

@ -26,7 +26,7 @@
* Test suite for #ALTIUM_PARSER_SCH * Test suite for #ALTIUM_PARSER_SCH
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <eeschema/sch_plugins/altium/altium_parser_sch.h> #include <eeschema/sch_plugins/altium/altium_parser_sch.h>

View File

@ -28,7 +28,7 @@
*/ */
#include <string.h> #include <string.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <vector> #include <vector>
#include <wx/string.h> #include <wx/string.h>

View File

@ -22,7 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <kiway.h> #include <kiway.h>
#include <sch_io_mgr.h> #include <sch_io_mgr.h>

View File

@ -26,7 +26,7 @@
* Test suite for LIB_ARC * Test suite for LIB_ARC
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <trigo.h> #include <trigo.h>
#include <convert_to_biu.h> #include <convert_to_biu.h>

View File

@ -26,7 +26,7 @@
* Test suite for LIB_PART * Test suite for LIB_PART
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <lib_rectangle.h> #include <lib_rectangle.h>

View File

@ -31,7 +31,7 @@
#include <pgm_base.h> #include <pgm_base.h>
#include <wx/init.h> #include <wx/init.h>
#include <unit_test_utils/wx_assert.h> #include <qa_utils/wx_utils/wx_assert.h>
/* /*
* Simple function to handle a WX assertion and throw a real exception. * Simple function to handle a WX assertion and throw a real exception.
@ -71,4 +71,4 @@ int main( int argc, char* argv[] )
wxUninitialize(); wxUninitialize();
return ret; return ret;
} }

View File

@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include "eeschema_test_utils.h" #include "eeschema_test_utils.h"
#include <connection_graph.h> #include <connection_graph.h>

View File

@ -27,7 +27,7 @@
* Test suite for schematic base internal units (1 = 100nm). * Test suite for schematic base internal units (1 = 100nm).
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <convert_to_biu.h> #include <convert_to_biu.h>

View File

@ -21,8 +21,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <unit_test_utils/wx_assert.h> #include <qa_utils/wx_utils/wx_assert.h>
// Code under test // Code under test
#include <sch_pin.h> #include <sch_pin.h>

View File

@ -29,14 +29,14 @@
#include <convert_to_biu.h> #include <convert_to_biu.h>
#include <sch_junction.h> #include <sch_junction.h>
#include <sch_no_connect.h> #include <sch_no_connect.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <sch_rtree.h> #include <sch_rtree.h>
#include "uuid_test_utils.h" #include "uuid_test_utils.h"
#include <unit_test_utils/wx_assert.h> #include <qa_utils/wx_utils/wx_assert.h>
class TEST_SCH_RTREE_FIXTURE class TEST_SCH_RTREE_FIXTURE
{ {

View File

@ -26,7 +26,7 @@
* Test suite for SCH_SHEET * Test suite for SCH_SHEET
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <sch_sheet.h> #include <sch_sheet.h>
@ -35,7 +35,7 @@
#include "uuid_test_utils.h" #include "uuid_test_utils.h"
#include <unit_test_utils/wx_assert.h> #include <qa_utils/wx_utils/wx_assert.h>
class TEST_SCH_SHEET_FIXTURE class TEST_SCH_SHEET_FIXTURE
{ {

View File

@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include "eeschema_test_utils.h" #include "eeschema_test_utils.h"
#include <sch_io_mgr.h> #include <sch_io_mgr.h>

View File

@ -26,7 +26,7 @@
* Test suite for #SCH_SHEET_PATH and #SCH_SHEET_LIST * Test suite for #SCH_SHEET_PATH and #SCH_SHEET_LIST
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <sch_sheet_path.h> #include <sch_sheet_path.h>

View File

@ -26,7 +26,7 @@
* Test suite for SCH_COMPONENT object. * Test suite for SCH_COMPONENT object.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <sch_symbol.h> #include <sch_symbol.h>

View File

@ -23,7 +23,7 @@
#include "uuid_test_utils.h" #include "uuid_test_utils.h"
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
namespace KI_TEST namespace KI_TEST
{ {

View File

@ -57,7 +57,6 @@ target_link_libraries( qa_gerbview
common common
gal gal
qa_utils qa_utils
unit_test_utils
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES} ${GDI_PLUS_LIBRARIES}
${PYTHON_LIBRARIES} ${PYTHON_LIBRARIES}

View File

@ -47,7 +47,6 @@ add_executable( qa_kimath ${KIMATH_SRCS} )
target_link_libraries( qa_kimath target_link_libraries( qa_kimath
qa_utils qa_utils
kimath kimath
unit_test_utils
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
) )

View File

@ -30,8 +30,8 @@
#include <geometry/shape_line_chain.h> #include <geometry/shape_line_chain.h>
#include <geometry/shape_poly_set.h> #include <geometry/shape_poly_set.h>
#include <unit_test_utils/numeric.h> #include <qa_utils/numeric.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
/** /**
* @brief Utility functions for testing geometry functions. * @brief Utility functions for testing geometry functions.
@ -244,4 +244,4 @@ struct print_log_value<SHAPE_LINE_CHAIN>
BOOST_TEST_PRINT_NAMESPACE_CLOSE BOOST_TEST_PRINT_NAMESPACE_CLOSE
#endif // GEOM_TEST_UTILS_H #endif // GEOM_TEST_UTILS_H

View File

@ -18,7 +18,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <geometry/circle.h> #include <geometry/circle.h>
#include <geometry/seg.h> // for SEG #include <geometry/seg.h> // for SEG
#include <geometry/shape.h> // for MIN_PRECISION_IU #include <geometry/shape.h> // for MIN_PRECISION_IU

View File

@ -23,7 +23,7 @@
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <geometry/shape_poly_set.h> #include <geometry/shape_poly_set.h>
#include <geometry/shape_line_chain.h> #include <geometry/shape_line_chain.h>

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <geometry/shape_line_chain.h> #include <geometry/shape_line_chain.h>
#include <geometry/shape_poly_set.h> #include <geometry/shape_poly_set.h>

View File

@ -23,7 +23,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <geometry/seg.h> #include <geometry/seg.h>

View File

@ -25,9 +25,9 @@
#include <geometry/shape_line_chain.h> #include <geometry/shape_line_chain.h>
#include <unit_test_utils/geometry.h> #include <qa_utils/geometry/geometry.h>
#include <unit_test_utils/numeric.h> #include <qa_utils/numeric.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include "geom_test_utils.h" #include "geom_test_utils.h"

View File

@ -22,7 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <geometry/shape_compound.h> #include <geometry/shape_compound.h>
#include <geometry/shape_circle.h> #include <geometry/shape_circle.h>

View File

@ -24,9 +24,9 @@
#include <geometry/shape_arc.h> #include <geometry/shape_arc.h>
#include <geometry/shape_line_chain.h> #include <geometry/shape_line_chain.h>
#include <unit_test_utils/geometry.h> #include <qa_utils/geometry/geometry.h>
#include <unit_test_utils/numeric.h> #include <qa_utils/numeric.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include "geom_test_utils.h" #include "geom_test_utils.h"

View File

@ -23,7 +23,7 @@
*/ */
#include <tuple> #include <tuple>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <geometry/shape_line_chain.h> #include <geometry/shape_line_chain.h>
#include <geometry/shape_poly_set.h> #include <geometry/shape_poly_set.h>

View File

@ -22,7 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <convert_to_biu.h> #include <convert_to_biu.h>
@ -31,7 +31,7 @@
#include <qa_utils/geometry/poly_set_construction.h> #include <qa_utils/geometry/poly_set_construction.h>
#include <qa_utils/geometry/seg_construction.h> #include <qa_utils/geometry/seg_construction.h>
#include <unit_test_utils/geometry.h> #include <qa_utils/geometry/geometry.h>
/// Mock up a conversion function /// Mock up a conversion function
constexpr static double IU_PER_MM = 1e3; constexpr static double IU_PER_MM = 1e3;

View File

@ -22,7 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <geometry/shape_line_chain.h> #include <geometry/shape_line_chain.h>
#include <geometry/shape_poly_set.h> #include <geometry/shape_poly_set.h>

View File

@ -25,7 +25,7 @@
* Test suite for KiCad math code. * Test suite for KiCad math code.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <math/vector2d.h> #include <math/vector2d.h>

View File

@ -25,7 +25,7 @@
* Test suite for KiCad math code. * Test suite for KiCad math code.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <math/vector3.h> #include <math/vector3.h>

View File

@ -25,7 +25,7 @@
* Test suite for KiCad math code. * Test suite for KiCad math code.
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <trigo.h> #include <trigo.h>

View File

@ -33,7 +33,7 @@ add_executable( qa_sexpr ${SEXPR_SRCS} )
target_link_libraries( qa_sexpr target_link_libraries( qa_sexpr
sexpr sexpr
unit_test_utils qa_utils
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
) )

View File

@ -26,7 +26,7 @@
#include <sexpr/sexpr.h> #include <sexpr/sexpr.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
namespace KI_TEST namespace KI_TEST
{ {

View File

@ -26,7 +26,7 @@
* Test suite for SEXPR::PARSER * Test suite for SEXPR::PARSER
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <sexpr/sexpr.h> #include <sexpr/sexpr.h>

View File

@ -26,7 +26,7 @@
* Test suite for SEXPR::PARSER * Test suite for SEXPR::PARSER
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <sexpr/sexpr_parser.h> #include <sexpr/sexpr_parser.h>

View File

@ -78,7 +78,6 @@ target_link_libraries( qa_pcbnew
tinyspline_lib tinyspline_lib
nanosvg nanosvg
idf3 idf3
unit_test_utils
markdown_lib markdown_lib
${PCBNEW_IO_LIBRARIES} ${PCBNEW_IO_LIBRARIES}
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <pcbnew_utils/board_construction_utils.h> #include <pcbnew_utils/board_construction_utils.h>
#include <pcbnew_utils/board_file_utils.h> #include <pcbnew_utils/board_file_utils.h>

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <pcbnew_utils/board_construction_utils.h> #include <pcbnew_utils/board_construction_utils.h>
#include <pcbnew_utils/board_file_utils.h> #include <pcbnew_utils/board_file_utils.h>

View File

@ -32,7 +32,7 @@
#include <common.h> #include <common.h>
#include <pcbnew_utils/board_construction_utils.h> #include <pcbnew_utils/board_construction_utils.h>
#include <pcbnew_utils/board_file_utils.h> #include <pcbnew_utils/board_file_utils.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
BOOST_AUTO_TEST_SUITE( GroupSaveLoad ) BOOST_AUTO_TEST_SUITE( GroupSaveLoad )

View File

@ -26,7 +26,7 @@
* Test suite for #ALTIUM_RULE_TOKENIZER * Test suite for #ALTIUM_RULE_TOKENIZER
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <pcbnew/plugins/altium/altium_rule_transformer.h> #include <pcbnew/plugins/altium/altium_rule_transformer.h>

View File

@ -26,7 +26,7 @@
* Test suite for the #ARRAY_PAD_NAME_PROVIDER class * Test suite for the #ARRAY_PAD_NAME_PROVIDER class
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <array_pad_name_provider.h> // UUT #include <array_pad_name_provider.h> // UUT

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <import_gfx/graphics_import_mgr.h> #include <import_gfx/graphics_import_mgr.h>
#include <import_gfx/graphics_import_plugin.h> #include <import_gfx/graphics_import_plugin.h>

View File

@ -23,7 +23,7 @@
#include <wx/wx.h> #include <wx/wx.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <layers_id_colors_and_visibility.h> #include <layers_id_colors_and_visibility.h>
#include <pcbnew/pcb_expr_evaluator.h> #include <pcbnew/pcb_expr_evaluator.h>

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <layers_id_colors_and_visibility.h> #include <layers_id_colors_and_visibility.h>

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <board.h> #include <board.h>
#include <footprint.h> #include <footprint.h>

View File

@ -53,7 +53,6 @@ target_link_libraries( qa_pcbnew_tools
idf3 idf3
common common
qa_utils qa_utils
unit_test_utils
markdown_lib markdown_lib
${PCBNEW_IO_LIBRARIES} ${PCBNEW_IO_LIBRARIES}
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}

View File

@ -19,6 +19,8 @@
# or you may write to the Free Software Foundation, Inc., # or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
find_package( Boost COMPONENTS unit_test_framework filesystem system REQUIRED )
set( QA_UTIL_COMMON_SRC set( QA_UTIL_COMMON_SRC
stdstream_line_reader.cpp stdstream_line_reader.cpp
utility_program.cpp utility_program.cpp
@ -26,6 +28,9 @@ set( QA_UTIL_COMMON_SRC
geometry/line_chain_construction.cpp geometry/line_chain_construction.cpp
geometry/poly_set_construction.cpp geometry/poly_set_construction.cpp
geometry/seg_construction.cpp geometry/seg_construction.cpp
wx_utils/unit_test_utils.cpp
wx_utils/wx_assert.cpp
) )
# A generic library of useful functions for various testing purposes # A generic library of useful functions for various testing purposes
@ -37,9 +42,16 @@ include_directories( BEFORE ${INC_BEFORE} )
target_link_libraries( qa_utils target_link_libraries( qa_utils
common common
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
) )
target_include_directories( qa_utils PUBLIC target_include_directories( qa_utils PUBLIC
include include
) )
target_compile_definitions( qa_utils PUBLIC
BOOST_TEST_DYN_LINK
)

View File

@ -24,8 +24,8 @@
#ifndef QA_UNIT_TEST_UTILS_GEOM__H #ifndef QA_UNIT_TEST_UTILS_GEOM__H
#define QA_UNIT_TEST_UTILS_GEOM__H #define QA_UNIT_TEST_UTILS_GEOM__H
#include <unit_test_utils/numeric.h> #include <qa_utils/numeric.h>
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <math/box2.h> #include <math/box2.h>
#include <math/vector2d.h> #include <math/vector2d.h>
@ -68,4 +68,4 @@ bool IsBoxWithinTol( const BOX& aBox, const BOX& aExp, typename BOX::coord_type
} // namespace KI_TEST } // namespace KI_TEST
#endif // QA_UNIT_TEST_UTILS_GEOM__H #endif // QA_UNIT_TEST_UTILS_GEOM__H

View File

@ -26,7 +26,7 @@
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <unit_test_utils/wx_assert.h> #include <qa_utils/wx_utils/wx_assert.h>
#include <functional> #include <functional>
#include <set> #include <set>

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
namespace BOOST_TEST_PRINT_NAMESPACE_OPEN namespace BOOST_TEST_PRINT_NAMESPACE_OPEN
{ {

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <unit_test_utils/wx_assert.h> #include <qa_utils/wx_utils/wx_assert.h>
#include <sstream> #include <sstream>

View File

@ -1,50 +0,0 @@
# This program source code file is part of KiCad, a free EDA CAD application.
#
# Copyright (C) 2018 KiCad Developers, see CHANGELOG.TXT for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# The unit_test_utils library is a simple helper library to collate
# utilities that are generically useful for unit test executables.
#
# Code that is useful for QA purposes outside of the unit-testing context
# belongs in qa_utils.
find_package( Boost COMPONENTS unit_test_framework filesystem system REQUIRED )
set( SRCS
unit_test_utils.cpp
wx_assert.cpp
)
add_library( unit_test_utils STATIC ${SRCS} )
target_link_libraries( unit_test_utils PUBLIC
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${wxWidgets_LIBRARIES}
)
target_include_directories( unit_test_utils PUBLIC
include
)
target_compile_definitions( unit_test_utils PUBLIC
BOOST_TEST_DYN_LINK
)

View File

@ -36,7 +36,7 @@ add_executable( qa_kicad2step ${K2S_TEST_SRCS} )
target_link_libraries( qa_kicad2step target_link_libraries( qa_kicad2step
kicad2step_lib kicad2step_lib
unit_test_utils qa_utils
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
) )

View File

@ -26,7 +26,7 @@
* Test suite for PCB "base" sexpr parsing * Test suite for PCB "base" sexpr parsing
*/ */
#include <unit_test_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
// Code under test // Code under test
#include <pcb/base.h> #include <pcb/base.h>