From 31da3e7dc61730fe6c2b2e942396dd85fb386926 Mon Sep 17 00:00:00 2001 From: Sylwester Kocjan Date: Sat, 6 Feb 2021 23:20:31 +0100 Subject: [PATCH] qa: merge unit_test_utils to qa_utils --- qa/CMakeLists.txt | 1 - qa/common/CMakeLists.txt | 1 - qa/common/color4d_test_utils.h | 4 +- qa/common/libeval/test_numeric_evaluator.cpp | 2 +- .../plugins/altium/test_altium_parser.cpp | 2 +- .../altium/test_altium_parser_utils.cpp | 2 +- qa/common/test_array_axis.cpp | 4 +- qa/common/test_array_options.cpp | 6 +-- qa/common/test_bitmap_base.cpp | 2 +- qa/common/test_color4d.cpp | 2 +- qa/common/test_coroutine.cpp | 4 +- qa/common/test_format_units.cpp | 2 +- qa/common/test_kicad_string.cpp | 2 +- qa/common/test_lib_table.cpp | 2 +- qa/common/test_property.cpp | 2 +- qa/common/test_refdes_utils.cpp | 4 +- qa/common/test_title_block.cpp | 2 +- qa/common/test_utf8.cpp | 2 +- qa/common/test_wildcards_and_files_ext.cpp | 2 +- qa/common/test_wx_filename.cpp | 4 +- qa/common/view/test_zoom_controller.cpp | 2 +- qa/common/wximage_test_utils.h | 4 +- qa/drc_proto/CMakeLists.txt | 1 - qa/eeschema/CMakeLists.txt | 1 - qa/eeschema/lib_field_test_utils.h | 4 +- .../altium/test_altium_parser_sch.cpp | 2 +- .../sim/test_netlist_exporter_pspice_sim.cpp | 2 +- qa/eeschema/test_eagle_plugin.cpp | 2 +- qa/eeschema/test_lib_arc.cpp | 2 +- qa/eeschema/test_lib_part.cpp | 2 +- qa/eeschema/test_module.cpp | 4 +- qa/eeschema/test_netlists.cpp | 2 +- qa/eeschema/test_sch_biu.cpp | 2 +- qa/eeschema/test_sch_pin.cpp | 4 +- qa/eeschema/test_sch_rtree.cpp | 4 +- qa/eeschema/test_sch_sheet.cpp | 4 +- qa/eeschema/test_sch_sheet_list.cpp | 2 +- qa/eeschema/test_sch_sheet_path.cpp | 2 +- qa/eeschema/test_sch_symbol.cpp | 2 +- qa/eeschema/uuid_test_utils.cpp | 2 +- qa/gerbview/CMakeLists.txt | 1 - qa/libs/kimath/CMakeLists.txt | 1 - qa/libs/kimath/geometry/geom_test_utils.h | 6 +-- qa/libs/kimath/geometry/test_circle.cpp | 2 +- qa/libs/kimath/geometry/test_fillet.cpp | 2 +- .../geometry/test_poly_grid_partition.cpp | 2 +- qa/libs/kimath/geometry/test_segment.cpp | 2 +- qa/libs/kimath/geometry/test_shape_arc.cpp | 6 +-- .../test_shape_compound_collision.cpp | 2 +- .../kimath/geometry/test_shape_line_chain.cpp | 6 +-- .../test_shape_poly_set_collision.cpp | 2 +- .../geometry/test_shape_poly_set_distance.cpp | 4 +- .../geometry/test_shape_poly_set_iterator.cpp | 2 +- qa/libs/kimath/math/test_vector2.cpp | 2 +- qa/libs/kimath/math/test_vector3.cpp | 2 +- qa/libs/kimath/test_kimath.cpp | 2 +- qa/libs/sexpr/CMakeLists.txt | 2 +- qa/libs/sexpr/sexpr_test_utils.h | 2 +- qa/libs/sexpr/test_sexpr.cpp | 2 +- qa/libs/sexpr/test_sexpr_parser.cpp | 2 +- qa/pcbnew/CMakeLists.txt | 1 - qa/pcbnew/drc/test_drc_courtyard_invalid.cpp | 2 +- qa/pcbnew/drc/test_drc_courtyard_overlap.cpp | 2 +- qa/pcbnew/group_saveload.cpp | 2 +- .../altium/test_altium_rule_transformer.cpp | 2 +- qa/pcbnew/test_array_pad_name_provider.cpp | 2 +- qa/pcbnew/test_graphics_import_mgr.cpp | 2 +- qa/pcbnew/test_libeval_compiler.cpp | 2 +- qa/pcbnew/test_lset.cpp | 2 +- qa/pcbnew/test_pad_naming.cpp | 2 +- qa/pcbnew_tools/CMakeLists.txt | 1 - qa/qa_utils/CMakeLists.txt | 12 +++++ .../include/qa_utils/geometry}/geometry.h | 6 +-- .../include/qa_utils}/numeric.h | 0 .../qa_utils/wx_utils}/unit_test_utils.h | 2 +- .../include/qa_utils/wx_utils}/wx_assert.h | 0 .../wx_utils}/unit_test_utils.cpp | 2 +- .../wx_utils}/wx_assert.cpp | 2 +- qa/unit_test_utils/CMakeLists.txt | 50 ------------------- qa/utils/kicad2step/CMakeLists.txt | 2 +- qa/utils/kicad2step/pcb/test_base.cpp | 2 +- 81 files changed, 103 insertions(+), 149 deletions(-) rename qa/{unit_test_utils/include/unit_test_utils => qa_utils/include/qa_utils/geometry}/geometry.h (94%) rename qa/{unit_test_utils/include/unit_test_utils => qa_utils/include/qa_utils}/numeric.h (100%) rename qa/{unit_test_utils/include/unit_test_utils => qa_utils/include/qa_utils/wx_utils}/unit_test_utils.h (99%) rename qa/{unit_test_utils/include/unit_test_utils => qa_utils/include/qa_utils/wx_utils}/wx_assert.h (100%) rename qa/{unit_test_utils => qa_utils/wx_utils}/unit_test_utils.cpp (94%) rename qa/{unit_test_utils => qa_utils/wx_utils}/wx_assert.cpp (96%) delete mode 100644 qa/unit_test_utils/CMakeLists.txt diff --git a/qa/CMakeLists.txt b/qa/CMakeLists.txt index bdaaa46c77..8d9d88ae18 100644 --- a/qa/CMakeLists.txt +++ b/qa/CMakeLists.txt @@ -44,7 +44,6 @@ endif() # Shared QA helper libraries add_subdirectory( qa_utils ) add_subdirectory( pcbnew_utils ) -add_subdirectory( unit_test_utils ) # Unit tests add_subdirectory( common ) diff --git a/qa/common/CMakeLists.txt b/qa/common/CMakeLists.txt index f11464a0b5..518a31897f 100644 --- a/qa/common/CMakeLists.txt +++ b/qa/common/CMakeLists.txt @@ -55,7 +55,6 @@ set( common_libs common gal qa_utils - unit_test_utils ${wxWidgets_LIBRARIES} ) diff --git a/qa/common/color4d_test_utils.h b/qa/common/color4d_test_utils.h index f7026377be..cc0f669b76 100644 --- a/qa/common/color4d_test_utils.h +++ b/qa/common/color4d_test_utils.h @@ -31,7 +31,7 @@ #include -#include +#include namespace KI_TEST { @@ -61,4 +61,4 @@ inline bool IsColorNearHex( const KIGFX::COLOR4D& aCol, unsigned char r, unsigne } } // namespace KI_TEST -#endif // QA_COMMON_COLOR4D_TEST_UTILS__H \ No newline at end of file +#endif // QA_COMMON_COLOR4D_TEST_UTILS__H diff --git a/qa/common/libeval/test_numeric_evaluator.cpp b/qa/common/libeval/test_numeric_evaluator.cpp index e9c7fa3ac6..59d3d5b344 100644 --- a/qa/common/libeval/test_numeric_evaluator.cpp +++ b/qa/common/libeval/test_numeric_evaluator.cpp @@ -26,7 +26,7 @@ * Test suite for #NUMERIC_EVALUATOR */ -#include +#include #include diff --git a/qa/common/plugins/altium/test_altium_parser.cpp b/qa/common/plugins/altium/test_altium_parser.cpp index 163a6dcac5..7a66167617 100644 --- a/qa/common/plugins/altium/test_altium_parser.cpp +++ b/qa/common/plugins/altium/test_altium_parser.cpp @@ -26,7 +26,7 @@ * Test suite for #ALTIUM_PARSER */ -#include +#include #include diff --git a/qa/common/plugins/altium/test_altium_parser_utils.cpp b/qa/common/plugins/altium/test_altium_parser_utils.cpp index 63f65edd46..65fe74f3d5 100644 --- a/qa/common/plugins/altium/test_altium_parser_utils.cpp +++ b/qa/common/plugins/altium/test_altium_parser_utils.cpp @@ -26,7 +26,7 @@ * Test suite for #ALTIUM_PARSER */ -#include +#include #include diff --git a/qa/common/test_array_axis.cpp b/qa/common/test_array_axis.cpp index 5e2773bd09..e629eb18aa 100644 --- a/qa/common/test_array_axis.cpp +++ b/qa/common/test_array_axis.cpp @@ -26,7 +26,7 @@ * Test suite for #ARRAY_AXIS */ -#include +#include #include @@ -221,4 +221,4 @@ BOOST_AUTO_TEST_CASE( Numbering ) } } -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file +BOOST_AUTO_TEST_SUITE_END() diff --git a/qa/common/test_array_options.cpp b/qa/common/test_array_options.cpp index b72cf76f32..3e05705222 100644 --- a/qa/common/test_array_options.cpp +++ b/qa/common/test_array_options.cpp @@ -26,8 +26,8 @@ * Test suite for #ARRAY_OPTIONS */ -#include -#include +#include +#include #include #include @@ -509,4 +509,4 @@ BOOST_AUTO_TEST_CASE( GridNaming ) } } -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file +BOOST_AUTO_TEST_SUITE_END() diff --git a/qa/common/test_bitmap_base.cpp b/qa/common/test_bitmap_base.cpp index e0682556a0..c7633c71c5 100644 --- a/qa/common/test_bitmap_base.cpp +++ b/qa/common/test_bitmap_base.cpp @@ -26,7 +26,7 @@ * Test suite for BITMAP_BASE */ -#include +#include // Code under test #include diff --git a/qa/common/test_color4d.cpp b/qa/common/test_color4d.cpp index 065044d45a..aee6c5b61c 100644 --- a/qa/common/test_color4d.cpp +++ b/qa/common/test_color4d.cpp @@ -25,7 +25,7 @@ #include "color4d_test_utils.h" -#include +#include #include diff --git a/qa/common/test_coroutine.cpp b/qa/common/test_coroutine.cpp index ad0824ca48..637a2bfe1a 100644 --- a/qa/common/test_coroutine.cpp +++ b/qa/common/test_coroutine.cpp @@ -29,7 +29,7 @@ * test utility. */ -#include +#include #include @@ -174,4 +174,4 @@ BOOST_AUTO_TEST_CASE( Increment ) received_events.begin(), received_events.end(), exp_events.begin(), exp_events.end() ); } -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file +BOOST_AUTO_TEST_SUITE_END() diff --git a/qa/common/test_format_units.cpp b/qa/common/test_format_units.cpp index 67d9297428..d0826749cf 100644 --- a/qa/common/test_format_units.cpp +++ b/qa/common/test_format_units.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include diff --git a/qa/common/test_kicad_string.cpp b/qa/common/test_kicad_string.cpp index 1054da11db..ed24479401 100644 --- a/qa/common/test_kicad_string.cpp +++ b/qa/common/test_kicad_string.cpp @@ -26,7 +26,7 @@ * Test suite for general string functions */ -#include +#include // Code under test #include diff --git a/qa/common/test_lib_table.cpp b/qa/common/test_lib_table.cpp index c754b26d5c..fbe3cb14db 100644 --- a/qa/common/test_lib_table.cpp +++ b/qa/common/test_lib_table.cpp @@ -30,7 +30,7 @@ * own logic should be done in the relevant tests. */ -#include +#include // Code under test #include diff --git a/qa/common/test_property.cpp b/qa/common/test_property.cpp index 723235fb72..3a36a79dbb 100644 --- a/qa/common/test_property.cpp +++ b/qa/common/test_property.cpp @@ -18,7 +18,7 @@ * with this program. If not, see . */ -#include +#include #include // wxPoint #include diff --git a/qa/common/test_refdes_utils.cpp b/qa/common/test_refdes_utils.cpp index 440ce7ef62..d140e153af 100644 --- a/qa/common/test_refdes_utils.cpp +++ b/qa/common/test_refdes_utils.cpp @@ -26,7 +26,7 @@ * Test suite for refdes functions */ -#include +#include // Code under test #include @@ -98,4 +98,4 @@ BOOST_AUTO_TEST_CASE( RefDesComp ) } -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file +BOOST_AUTO_TEST_SUITE_END() diff --git a/qa/common/test_title_block.cpp b/qa/common/test_title_block.cpp index 83a6a5149e..c49edbe549 100644 --- a/qa/common/test_title_block.cpp +++ b/qa/common/test_title_block.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include diff --git a/qa/common/test_utf8.cpp b/qa/common/test_utf8.cpp index 4a3ab2e2ae..cbda69710e 100644 --- a/qa/common/test_utf8.cpp +++ b/qa/common/test_utf8.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include diff --git a/qa/common/test_wildcards_and_files_ext.cpp b/qa/common/test_wildcards_and_files_ext.cpp index a04eb363f3..5c8d7e5351 100644 --- a/qa/common/test_wildcards_and_files_ext.cpp +++ b/qa/common/test_wildcards_and_files_ext.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include diff --git a/qa/common/test_wx_filename.cpp b/qa/common/test_wx_filename.cpp index 0f7b6e5627..08d5366321 100644 --- a/qa/common/test_wx_filename.cpp +++ b/qa/common/test_wx_filename.cpp @@ -26,7 +26,7 @@ * Test suite for WX_FILNAME */ -#include +#include // Code under test #include @@ -126,4 +126,4 @@ BOOST_AUTO_TEST_CASE( Split ) } } -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file +BOOST_AUTO_TEST_SUITE_END() diff --git a/qa/common/view/test_zoom_controller.cpp b/qa/common/view/test_zoom_controller.cpp index 9cc1189b16..87b3f96e4b 100644 --- a/qa/common/view/test_zoom_controller.cpp +++ b/qa/common/view/test_zoom_controller.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include diff --git a/qa/common/wximage_test_utils.h b/qa/common/wximage_test_utils.h index eefc2976b9..2e18057cc6 100644 --- a/qa/common/wximage_test_utils.h +++ b/qa/common/wximage_test_utils.h @@ -24,7 +24,7 @@ #ifndef QA_COMMON_WXIMAGE_TEST_UTILS__H #define QA_COMMON_WXIMAGE_TEST_UTILS__H -#include +#include #include @@ -56,4 +56,4 @@ struct print_log_value } // namespace BOOST_TEST_PRINT_NAMESPACE_OPEN BOOST_TEST_PRINT_NAMESPACE_CLOSE -#endif \ No newline at end of file +#endif diff --git a/qa/drc_proto/CMakeLists.txt b/qa/drc_proto/CMakeLists.txt index f771f0862e..56035c4776 100644 --- a/qa/drc_proto/CMakeLists.txt +++ b/qa/drc_proto/CMakeLists.txt @@ -98,7 +98,6 @@ target_link_libraries( drc_proto tinyspline_lib nanosvg idf3 - unit_test_utils ${PCBNEW_IO_LIBRARIES} ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES} diff --git a/qa/eeschema/CMakeLists.txt b/qa/eeschema/CMakeLists.txt index 5d4c488c9b..69ddc9997f 100644 --- a/qa/eeschema/CMakeLists.txt +++ b/qa/eeschema/CMakeLists.txt @@ -90,7 +90,6 @@ target_link_libraries( qa_eeschema pcbcommon kimath qa_utils - unit_test_utils markdown_lib ${GDI_PLUS_LIBRARIES} ${Boost_LIBRARIES} diff --git a/qa/eeschema/lib_field_test_utils.h b/qa/eeschema/lib_field_test_utils.h index e614a5192c..43701daaeb 100644 --- a/qa/eeschema/lib_field_test_utils.h +++ b/qa/eeschema/lib_field_test_utils.h @@ -29,7 +29,7 @@ #ifndef QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H #define QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H -#include +#include #include @@ -117,4 +117,4 @@ bool AreDefaultFieldsCorrect( const std::vector& aFields ) } // namespace KI_TEST -#endif // QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H \ No newline at end of file +#endif // QA_EESCHEMA_LIB_FIELD_TEST_UTILS__H diff --git a/qa/eeschema/sch_plugins/altium/test_altium_parser_sch.cpp b/qa/eeschema/sch_plugins/altium/test_altium_parser_sch.cpp index 9e152b7839..15722f5f31 100644 --- a/qa/eeschema/sch_plugins/altium/test_altium_parser_sch.cpp +++ b/qa/eeschema/sch_plugins/altium/test_altium_parser_sch.cpp @@ -26,7 +26,7 @@ * Test suite for #ALTIUM_PARSER_SCH */ -#include +#include #include diff --git a/qa/eeschema/sim/test_netlist_exporter_pspice_sim.cpp b/qa/eeschema/sim/test_netlist_exporter_pspice_sim.cpp index 7a6de33564..61351c3d73 100644 --- a/qa/eeschema/sim/test_netlist_exporter_pspice_sim.cpp +++ b/qa/eeschema/sim/test_netlist_exporter_pspice_sim.cpp @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include diff --git a/qa/eeschema/test_eagle_plugin.cpp b/qa/eeschema/test_eagle_plugin.cpp index 0411d4526a..2459d4b96b 100644 --- a/qa/eeschema/test_eagle_plugin.cpp +++ b/qa/eeschema/test_eagle_plugin.cpp @@ -22,7 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include #include diff --git a/qa/eeschema/test_lib_arc.cpp b/qa/eeschema/test_lib_arc.cpp index 5ee06c148d..22301608f7 100644 --- a/qa/eeschema/test_lib_arc.cpp +++ b/qa/eeschema/test_lib_arc.cpp @@ -26,7 +26,7 @@ * Test suite for LIB_ARC */ -#include +#include #include #include diff --git a/qa/eeschema/test_lib_part.cpp b/qa/eeschema/test_lib_part.cpp index 381d3ebc3f..a27580a3c8 100644 --- a/qa/eeschema/test_lib_part.cpp +++ b/qa/eeschema/test_lib_part.cpp @@ -26,7 +26,7 @@ * Test suite for LIB_PART */ -#include +#include // Code under test #include diff --git a/qa/eeschema/test_module.cpp b/qa/eeschema/test_module.cpp index 15548d8bf5..83bdb3ace7 100644 --- a/qa/eeschema/test_module.cpp +++ b/qa/eeschema/test_module.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include /* * Simple function to handle a WX assertion and throw a real exception. @@ -71,4 +71,4 @@ int main( int argc, char* argv[] ) wxUninitialize(); return ret; -} \ No newline at end of file +} diff --git a/qa/eeschema/test_netlists.cpp b/qa/eeschema/test_netlists.cpp index 275457406d..513d1b7f9f 100644 --- a/qa/eeschema/test_netlists.cpp +++ b/qa/eeschema/test_netlists.cpp @@ -17,7 +17,7 @@ * with this program. If not, see . */ -#include +#include #include "eeschema_test_utils.h" #include diff --git a/qa/eeschema/test_sch_biu.cpp b/qa/eeschema/test_sch_biu.cpp index 2ee30f4b56..5264b2888f 100644 --- a/qa/eeschema/test_sch_biu.cpp +++ b/qa/eeschema/test_sch_biu.cpp @@ -27,7 +27,7 @@ * Test suite for schematic base internal units (1 = 100nm). */ -#include +#include #include diff --git a/qa/eeschema/test_sch_pin.cpp b/qa/eeschema/test_sch_pin.cpp index 2efa7a44e8..5c94d93cdb 100644 --- a/qa/eeschema/test_sch_pin.cpp +++ b/qa/eeschema/test_sch_pin.cpp @@ -21,8 +21,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include +#include +#include // Code under test #include diff --git a/qa/eeschema/test_sch_rtree.cpp b/qa/eeschema/test_sch_rtree.cpp index 11919b8a70..d7c625eb75 100644 --- a/qa/eeschema/test_sch_rtree.cpp +++ b/qa/eeschema/test_sch_rtree.cpp @@ -29,14 +29,14 @@ #include #include #include -#include +#include // Code under test #include #include "uuid_test_utils.h" -#include +#include class TEST_SCH_RTREE_FIXTURE { diff --git a/qa/eeschema/test_sch_sheet.cpp b/qa/eeschema/test_sch_sheet.cpp index e8eb3f8785..7da3265659 100644 --- a/qa/eeschema/test_sch_sheet.cpp +++ b/qa/eeschema/test_sch_sheet.cpp @@ -26,7 +26,7 @@ * Test suite for SCH_SHEET */ -#include +#include // Code under test #include @@ -35,7 +35,7 @@ #include "uuid_test_utils.h" -#include +#include class TEST_SCH_SHEET_FIXTURE { diff --git a/qa/eeschema/test_sch_sheet_list.cpp b/qa/eeschema/test_sch_sheet_list.cpp index cd063a1a4f..bd9dfd1d87 100644 --- a/qa/eeschema/test_sch_sheet_list.cpp +++ b/qa/eeschema/test_sch_sheet_list.cpp @@ -17,7 +17,7 @@ * with this program. If not, see . */ -#include +#include #include "eeschema_test_utils.h" #include diff --git a/qa/eeschema/test_sch_sheet_path.cpp b/qa/eeschema/test_sch_sheet_path.cpp index 110403c3a5..c622044921 100644 --- a/qa/eeschema/test_sch_sheet_path.cpp +++ b/qa/eeschema/test_sch_sheet_path.cpp @@ -26,7 +26,7 @@ * Test suite for #SCH_SHEET_PATH and #SCH_SHEET_LIST */ -#include +#include // Code under test #include diff --git a/qa/eeschema/test_sch_symbol.cpp b/qa/eeschema/test_sch_symbol.cpp index b27b728d2e..2906e86f35 100644 --- a/qa/eeschema/test_sch_symbol.cpp +++ b/qa/eeschema/test_sch_symbol.cpp @@ -26,7 +26,7 @@ * Test suite for SCH_COMPONENT object. */ -#include +#include // Code under test #include diff --git a/qa/eeschema/uuid_test_utils.cpp b/qa/eeschema/uuid_test_utils.cpp index ff51498770..9fa8546c67 100644 --- a/qa/eeschema/uuid_test_utils.cpp +++ b/qa/eeschema/uuid_test_utils.cpp @@ -23,7 +23,7 @@ #include "uuid_test_utils.h" -#include +#include namespace KI_TEST { diff --git a/qa/gerbview/CMakeLists.txt b/qa/gerbview/CMakeLists.txt index cd34cd81d5..c16ecfb2ab 100644 --- a/qa/gerbview/CMakeLists.txt +++ b/qa/gerbview/CMakeLists.txt @@ -57,7 +57,6 @@ target_link_libraries( qa_gerbview common gal qa_utils - unit_test_utils ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES} ${PYTHON_LIBRARIES} diff --git a/qa/libs/kimath/CMakeLists.txt b/qa/libs/kimath/CMakeLists.txt index 599f022a32..bcca846f59 100644 --- a/qa/libs/kimath/CMakeLists.txt +++ b/qa/libs/kimath/CMakeLists.txt @@ -47,7 +47,6 @@ add_executable( qa_kimath ${KIMATH_SRCS} ) target_link_libraries( qa_kimath qa_utils kimath - unit_test_utils ${wxWidgets_LIBRARIES} ) diff --git a/qa/libs/kimath/geometry/geom_test_utils.h b/qa/libs/kimath/geometry/geom_test_utils.h index afb7f7e9c9..a0327bc4d0 100644 --- a/qa/libs/kimath/geometry/geom_test_utils.h +++ b/qa/libs/kimath/geometry/geom_test_utils.h @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include /** * @brief Utility functions for testing geometry functions. @@ -244,4 +244,4 @@ struct print_log_value BOOST_TEST_PRINT_NAMESPACE_CLOSE -#endif // GEOM_TEST_UTILS_H \ No newline at end of file +#endif // GEOM_TEST_UTILS_H diff --git a/qa/libs/kimath/geometry/test_circle.cpp b/qa/libs/kimath/geometry/test_circle.cpp index bdff759dbb..071e7b1c5c 100644 --- a/qa/libs/kimath/geometry/test_circle.cpp +++ b/qa/libs/kimath/geometry/test_circle.cpp @@ -18,7 +18,7 @@ * with this program. If not, see . */ -#include +#include #include #include // for SEG #include // for MIN_PRECISION_IU diff --git a/qa/libs/kimath/geometry/test_fillet.cpp b/qa/libs/kimath/geometry/test_fillet.cpp index 2049d82a1b..0d18115ead 100644 --- a/qa/libs/kimath/geometry/test_fillet.cpp +++ b/qa/libs/kimath/geometry/test_fillet.cpp @@ -23,7 +23,7 @@ #include -#include +#include #include #include diff --git a/qa/libs/kimath/geometry/test_poly_grid_partition.cpp b/qa/libs/kimath/geometry/test_poly_grid_partition.cpp index 0e0e6904f3..ecca171028 100644 --- a/qa/libs/kimath/geometry/test_poly_grid_partition.cpp +++ b/qa/libs/kimath/geometry/test_poly_grid_partition.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include #include diff --git a/qa/libs/kimath/geometry/test_segment.cpp b/qa/libs/kimath/geometry/test_segment.cpp index 470578f29a..e134679aa3 100644 --- a/qa/libs/kimath/geometry/test_segment.cpp +++ b/qa/libs/kimath/geometry/test_segment.cpp @@ -23,7 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include diff --git a/qa/libs/kimath/geometry/test_shape_arc.cpp b/qa/libs/kimath/geometry/test_shape_arc.cpp index 21bc220fef..2d5eeee218 100644 --- a/qa/libs/kimath/geometry/test_shape_arc.cpp +++ b/qa/libs/kimath/geometry/test_shape_arc.cpp @@ -25,9 +25,9 @@ #include -#include -#include -#include +#include +#include +#include #include "geom_test_utils.h" diff --git a/qa/libs/kimath/geometry/test_shape_compound_collision.cpp b/qa/libs/kimath/geometry/test_shape_compound_collision.cpp index 16be5419d6..d06b11b014 100644 --- a/qa/libs/kimath/geometry/test_shape_compound_collision.cpp +++ b/qa/libs/kimath/geometry/test_shape_compound_collision.cpp @@ -22,7 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include #include diff --git a/qa/libs/kimath/geometry/test_shape_line_chain.cpp b/qa/libs/kimath/geometry/test_shape_line_chain.cpp index 9b425af0aa..490da1a4f9 100644 --- a/qa/libs/kimath/geometry/test_shape_line_chain.cpp +++ b/qa/libs/kimath/geometry/test_shape_line_chain.cpp @@ -24,9 +24,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "geom_test_utils.h" diff --git a/qa/libs/kimath/geometry/test_shape_poly_set_collision.cpp b/qa/libs/kimath/geometry/test_shape_poly_set_collision.cpp index bf75e3692b..e80fd313b6 100644 --- a/qa/libs/kimath/geometry/test_shape_poly_set_collision.cpp +++ b/qa/libs/kimath/geometry/test_shape_poly_set_collision.cpp @@ -23,7 +23,7 @@ */ #include -#include +#include #include #include diff --git a/qa/libs/kimath/geometry/test_shape_poly_set_distance.cpp b/qa/libs/kimath/geometry/test_shape_poly_set_distance.cpp index aed5208cdf..34c123c847 100644 --- a/qa/libs/kimath/geometry/test_shape_poly_set_distance.cpp +++ b/qa/libs/kimath/geometry/test_shape_poly_set_distance.cpp @@ -22,7 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include @@ -31,7 +31,7 @@ #include #include -#include +#include /// Mock up a conversion function constexpr static double IU_PER_MM = 1e3; diff --git a/qa/libs/kimath/geometry/test_shape_poly_set_iterator.cpp b/qa/libs/kimath/geometry/test_shape_poly_set_iterator.cpp index ef9cc59e09..fad72acdfd 100644 --- a/qa/libs/kimath/geometry/test_shape_poly_set_iterator.cpp +++ b/qa/libs/kimath/geometry/test_shape_poly_set_iterator.cpp @@ -22,7 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include #include diff --git a/qa/libs/kimath/math/test_vector2.cpp b/qa/libs/kimath/math/test_vector2.cpp index cfb627c1dd..1fe42a7fcb 100644 --- a/qa/libs/kimath/math/test_vector2.cpp +++ b/qa/libs/kimath/math/test_vector2.cpp @@ -25,7 +25,7 @@ * Test suite for KiCad math code. */ -#include +#include // Code under test #include diff --git a/qa/libs/kimath/math/test_vector3.cpp b/qa/libs/kimath/math/test_vector3.cpp index 4005277f8c..dbbf27347c 100644 --- a/qa/libs/kimath/math/test_vector3.cpp +++ b/qa/libs/kimath/math/test_vector3.cpp @@ -25,7 +25,7 @@ * Test suite for KiCad math code. */ -#include +#include // Code under test #include diff --git a/qa/libs/kimath/test_kimath.cpp b/qa/libs/kimath/test_kimath.cpp index 07518e83e1..eea7a31f87 100644 --- a/qa/libs/kimath/test_kimath.cpp +++ b/qa/libs/kimath/test_kimath.cpp @@ -25,7 +25,7 @@ * Test suite for KiCad math code. */ -#include +#include // Code under test #include diff --git a/qa/libs/sexpr/CMakeLists.txt b/qa/libs/sexpr/CMakeLists.txt index 73fa74aae0..94871ed4a5 100644 --- a/qa/libs/sexpr/CMakeLists.txt +++ b/qa/libs/sexpr/CMakeLists.txt @@ -33,7 +33,7 @@ add_executable( qa_sexpr ${SEXPR_SRCS} ) target_link_libraries( qa_sexpr sexpr - unit_test_utils + qa_utils ${wxWidgets_LIBRARIES} ) diff --git a/qa/libs/sexpr/sexpr_test_utils.h b/qa/libs/sexpr/sexpr_test_utils.h index 31c97f96a1..34e8efe8d4 100644 --- a/qa/libs/sexpr/sexpr_test_utils.h +++ b/qa/libs/sexpr/sexpr_test_utils.h @@ -26,7 +26,7 @@ #include -#include +#include namespace KI_TEST { diff --git a/qa/libs/sexpr/test_sexpr.cpp b/qa/libs/sexpr/test_sexpr.cpp index a7b71341ed..4a348ab728 100644 --- a/qa/libs/sexpr/test_sexpr.cpp +++ b/qa/libs/sexpr/test_sexpr.cpp @@ -26,7 +26,7 @@ * Test suite for SEXPR::PARSER */ -#include +#include // Code under test #include diff --git a/qa/libs/sexpr/test_sexpr_parser.cpp b/qa/libs/sexpr/test_sexpr_parser.cpp index c54e40b35f..817ece4f0a 100644 --- a/qa/libs/sexpr/test_sexpr_parser.cpp +++ b/qa/libs/sexpr/test_sexpr_parser.cpp @@ -26,7 +26,7 @@ * Test suite for SEXPR::PARSER */ -#include +#include // Code under test #include diff --git a/qa/pcbnew/CMakeLists.txt b/qa/pcbnew/CMakeLists.txt index 8b69740d42..2d518e7c85 100644 --- a/qa/pcbnew/CMakeLists.txt +++ b/qa/pcbnew/CMakeLists.txt @@ -78,7 +78,6 @@ target_link_libraries( qa_pcbnew tinyspline_lib nanosvg idf3 - unit_test_utils markdown_lib ${PCBNEW_IO_LIBRARIES} ${wxWidgets_LIBRARIES} diff --git a/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp b/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp index 038a4d649b..4ffdbf16e1 100644 --- a/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp +++ b/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include #include diff --git a/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp b/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp index 33d7501b4a..40e9dc01a6 100644 --- a/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp +++ b/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include #include diff --git a/qa/pcbnew/group_saveload.cpp b/qa/pcbnew/group_saveload.cpp index 87b752ffd5..47f27cb42a 100644 --- a/qa/pcbnew/group_saveload.cpp +++ b/qa/pcbnew/group_saveload.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include BOOST_AUTO_TEST_SUITE( GroupSaveLoad ) diff --git a/qa/pcbnew/plugins/altium/test_altium_rule_transformer.cpp b/qa/pcbnew/plugins/altium/test_altium_rule_transformer.cpp index eeee53c8f6..0ce72f0c2f 100644 --- a/qa/pcbnew/plugins/altium/test_altium_rule_transformer.cpp +++ b/qa/pcbnew/plugins/altium/test_altium_rule_transformer.cpp @@ -26,7 +26,7 @@ * Test suite for #ALTIUM_RULE_TOKENIZER */ -#include +#include #include diff --git a/qa/pcbnew/test_array_pad_name_provider.cpp b/qa/pcbnew/test_array_pad_name_provider.cpp index 395e5459ef..274a4ac53b 100644 --- a/qa/pcbnew/test_array_pad_name_provider.cpp +++ b/qa/pcbnew/test_array_pad_name_provider.cpp @@ -26,7 +26,7 @@ * Test suite for the #ARRAY_PAD_NAME_PROVIDER class */ -#include +#include #include // UUT diff --git a/qa/pcbnew/test_graphics_import_mgr.cpp b/qa/pcbnew/test_graphics_import_mgr.cpp index f35c221179..0f97b2bd37 100644 --- a/qa/pcbnew/test_graphics_import_mgr.cpp +++ b/qa/pcbnew/test_graphics_import_mgr.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include #include diff --git a/qa/pcbnew/test_libeval_compiler.cpp b/qa/pcbnew/test_libeval_compiler.cpp index 026251dd5f..0872762ad1 100644 --- a/qa/pcbnew/test_libeval_compiler.cpp +++ b/qa/pcbnew/test_libeval_compiler.cpp @@ -23,7 +23,7 @@ #include -#include +#include #include #include diff --git a/qa/pcbnew/test_lset.cpp b/qa/pcbnew/test_lset.cpp index 068cad61a1..4e1085c55b 100644 --- a/qa/pcbnew/test_lset.cpp +++ b/qa/pcbnew/test_lset.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include diff --git a/qa/pcbnew/test_pad_naming.cpp b/qa/pcbnew/test_pad_naming.cpp index 9ad3af4e12..47a8ddfb63 100644 --- a/qa/pcbnew/test_pad_naming.cpp +++ b/qa/pcbnew/test_pad_naming.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include #include diff --git a/qa/pcbnew_tools/CMakeLists.txt b/qa/pcbnew_tools/CMakeLists.txt index b7120178af..39b5d3aa18 100644 --- a/qa/pcbnew_tools/CMakeLists.txt +++ b/qa/pcbnew_tools/CMakeLists.txt @@ -53,7 +53,6 @@ target_link_libraries( qa_pcbnew_tools idf3 common qa_utils - unit_test_utils markdown_lib ${PCBNEW_IO_LIBRARIES} ${wxWidgets_LIBRARIES} diff --git a/qa/qa_utils/CMakeLists.txt b/qa/qa_utils/CMakeLists.txt index 5526e89988..956e6404de 100644 --- a/qa/qa_utils/CMakeLists.txt +++ b/qa/qa_utils/CMakeLists.txt @@ -19,6 +19,8 @@ # or you may write to the Free Software Foundation, Inc., # 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 stdstream_line_reader.cpp utility_program.cpp @@ -26,6 +28,9 @@ set( QA_UTIL_COMMON_SRC geometry/line_chain_construction.cpp geometry/poly_set_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 @@ -37,9 +42,16 @@ include_directories( BEFORE ${INC_BEFORE} ) target_link_libraries( qa_utils common + ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} + ${Boost_FILESYSTEM_LIBRARY} + ${Boost_SYSTEM_LIBRARY} ${wxWidgets_LIBRARIES} ) target_include_directories( qa_utils PUBLIC include ) + +target_compile_definitions( qa_utils PUBLIC + BOOST_TEST_DYN_LINK +) diff --git a/qa/unit_test_utils/include/unit_test_utils/geometry.h b/qa/qa_utils/include/qa_utils/geometry/geometry.h similarity index 94% rename from qa/unit_test_utils/include/unit_test_utils/geometry.h rename to qa/qa_utils/include/qa_utils/geometry/geometry.h index a1ff13b3b0..98aa605c0e 100644 --- a/qa/unit_test_utils/include/unit_test_utils/geometry.h +++ b/qa/qa_utils/include/qa_utils/geometry/geometry.h @@ -24,8 +24,8 @@ #ifndef QA_UNIT_TEST_UTILS_GEOM__H #define QA_UNIT_TEST_UTILS_GEOM__H -#include -#include +#include +#include #include #include @@ -68,4 +68,4 @@ bool IsBoxWithinTol( const BOX& aBox, const BOX& aExp, typename BOX::coord_type } // namespace KI_TEST -#endif // QA_UNIT_TEST_UTILS_GEOM__H \ No newline at end of file +#endif // QA_UNIT_TEST_UTILS_GEOM__H diff --git a/qa/unit_test_utils/include/unit_test_utils/numeric.h b/qa/qa_utils/include/qa_utils/numeric.h similarity index 100% rename from qa/unit_test_utils/include/unit_test_utils/numeric.h rename to qa/qa_utils/include/qa_utils/numeric.h diff --git a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h b/qa/qa_utils/include/qa_utils/wx_utils/unit_test_utils.h similarity index 99% rename from qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h rename to qa/qa_utils/include/qa_utils/wx_utils/unit_test_utils.h index 8763a01da6..a9d23a52ca 100644 --- a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h +++ b/qa/qa_utils/include/qa_utils/wx_utils/unit_test_utils.h @@ -26,7 +26,7 @@ #include -#include +#include #include #include diff --git a/qa/unit_test_utils/include/unit_test_utils/wx_assert.h b/qa/qa_utils/include/qa_utils/wx_utils/wx_assert.h similarity index 100% rename from qa/unit_test_utils/include/unit_test_utils/wx_assert.h rename to qa/qa_utils/include/qa_utils/wx_utils/wx_assert.h diff --git a/qa/unit_test_utils/unit_test_utils.cpp b/qa/qa_utils/wx_utils/unit_test_utils.cpp similarity index 94% rename from qa/unit_test_utils/unit_test_utils.cpp rename to qa/qa_utils/wx_utils/unit_test_utils.cpp index ef39ffe780..290ede5e0d 100644 --- a/qa/unit_test_utils/unit_test_utils.cpp +++ b/qa/qa_utils/wx_utils/unit_test_utils.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include namespace BOOST_TEST_PRINT_NAMESPACE_OPEN { diff --git a/qa/unit_test_utils/wx_assert.cpp b/qa/qa_utils/wx_utils/wx_assert.cpp similarity index 96% rename from qa/unit_test_utils/wx_assert.cpp rename to qa/qa_utils/wx_utils/wx_assert.cpp index a34141c8a0..9435de6e7a 100644 --- a/qa/unit_test_utils/wx_assert.cpp +++ b/qa/qa_utils/wx_utils/wx_assert.cpp @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include #include diff --git a/qa/unit_test_utils/CMakeLists.txt b/qa/unit_test_utils/CMakeLists.txt deleted file mode 100644 index 2bd0aa35c6..0000000000 --- a/qa/unit_test_utils/CMakeLists.txt +++ /dev/null @@ -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 -) diff --git a/qa/utils/kicad2step/CMakeLists.txt b/qa/utils/kicad2step/CMakeLists.txt index 75a166df3b..d81c72b3a3 100644 --- a/qa/utils/kicad2step/CMakeLists.txt +++ b/qa/utils/kicad2step/CMakeLists.txt @@ -36,7 +36,7 @@ add_executable( qa_kicad2step ${K2S_TEST_SRCS} ) target_link_libraries( qa_kicad2step kicad2step_lib - unit_test_utils + qa_utils ${wxWidgets_LIBRARIES} ) diff --git a/qa/utils/kicad2step/pcb/test_base.cpp b/qa/utils/kicad2step/pcb/test_base.cpp index 346b5ca1d9..49ffd7183a 100644 --- a/qa/utils/kicad2step/pcb/test_base.cpp +++ b/qa/utils/kicad2step/pcb/test_base.cpp @@ -26,7 +26,7 @@ * Test suite for PCB "base" sexpr parsing */ -#include +#include // Code under test #include