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
add_subdirectory( qa_utils )
add_subdirectory( pcbnew_utils )
add_subdirectory( unit_test_utils )
# Unit tests
add_subdirectory( common )

View File

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

View File

@ -31,7 +31,7 @@
#include <gal/color4d.h>
#include <unit_test_utils/numeric.h>
#include <qa_utils/numeric.h>
namespace KI_TEST
{

View File

@ -26,7 +26,7 @@
* 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>

View File

@ -26,7 +26,7 @@
* 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>

View File

@ -26,7 +26,7 @@
* 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>

View File

@ -26,7 +26,7 @@
* 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>

View File

@ -26,8 +26,8 @@
* Test suite for #ARRAY_OPTIONS
*/
#include <unit_test_utils/geometry.h>
#include <unit_test_utils/unit_test_utils.h>
#include <qa_utils/geometry/geometry.h>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <base_units.h>
#include <trigo.h>

View File

@ -26,7 +26,7 @@
* 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
#include <bitmap_base.h>

View File

@ -25,7 +25,7 @@
#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>

View File

@ -29,7 +29,7 @@
* test utility.
*/
#include <unit_test_utils/unit_test_utils.h>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <tool/coroutine.h>

View File

@ -21,7 +21,7 @@
* 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>

View File

@ -26,7 +26,7 @@
* 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
#include <kicad_string.h>

View File

@ -30,7 +30,7 @@
* 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
#include <lib_table_base.h>

View File

@ -18,7 +18,7 @@
* 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 <inspectable.h>

View File

@ -26,7 +26,7 @@
* 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
#include <refdes_utils.h>

View File

@ -21,7 +21,7 @@
* 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>

View File

@ -21,7 +21,7 @@
* 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>

View File

@ -21,7 +21,7 @@
* 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>

View File

@ -26,7 +26,7 @@
* 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
#include <wx_filename.h>

View File

@ -21,7 +21,7 @@
* 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>

View File

@ -24,7 +24,7 @@
#ifndef 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>

View File

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

View File

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

View File

@ -29,7 +29,7 @@
#ifndef 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>

View File

@ -26,7 +26,7 @@
* 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>

View File

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

View File

@ -22,7 +22,7 @@
* 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 <sch_io_mgr.h>

View File

@ -26,7 +26,7 @@
* 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 <convert_to_biu.h>

View File

@ -26,7 +26,7 @@
* 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
#include <lib_rectangle.h>

View File

@ -31,7 +31,7 @@
#include <pgm_base.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.

View File

@ -17,7 +17,7 @@
* 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 <connection_graph.h>

View File

@ -27,7 +27,7 @@
* 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>

View File

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

View File

@ -29,14 +29,14 @@
#include <convert_to_biu.h>
#include <sch_junction.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
#include <sch_rtree.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
{

View File

@ -26,7 +26,7 @@
* 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
#include <sch_sheet.h>
@ -35,7 +35,7 @@
#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
{

View File

@ -17,7 +17,7 @@
* 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 <sch_io_mgr.h>

View File

@ -26,7 +26,7 @@
* 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
#include <sch_sheet_path.h>

View File

@ -26,7 +26,7 @@
* 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
#include <sch_symbol.h>

View File

@ -23,7 +23,7 @@
#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
{

View File

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

View File

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

View File

@ -30,8 +30,8 @@
#include <geometry/shape_line_chain.h>
#include <geometry/shape_poly_set.h>
#include <unit_test_utils/numeric.h>
#include <unit_test_utils/unit_test_utils.h>
#include <qa_utils/numeric.h>
#include <qa_utils/wx_utils/unit_test_utils.h>
/**
* @brief Utility functions for testing geometry functions.

View File

@ -18,7 +18,7 @@
* 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/seg.h> // for SEG
#include <geometry/shape.h> // for MIN_PRECISION_IU

View File

@ -23,7 +23,7 @@
#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_line_chain.h>

View File

@ -21,7 +21,7 @@
* 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_poly_set.h>

View File

@ -23,7 +23,7 @@
* 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>

View File

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

View File

@ -22,7 +22,7 @@
* 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_circle.h>

View File

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

View File

@ -23,7 +23,7 @@
*/
#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_poly_set.h>

View File

@ -22,7 +22,7 @@
* 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>
@ -31,7 +31,7 @@
#include <qa_utils/geometry/poly_set_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
constexpr static double IU_PER_MM = 1e3;

View File

@ -22,7 +22,7 @@
* 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_poly_set.h>

View File

@ -25,7 +25,7 @@
* 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
#include <math/vector2d.h>

View File

@ -25,7 +25,7 @@
* 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
#include <math/vector3.h>

View File

@ -25,7 +25,7 @@
* 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
#include <trigo.h>

View File

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

View File

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

View File

@ -26,7 +26,7 @@
* 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
#include <sexpr/sexpr.h>

View File

@ -26,7 +26,7 @@
* 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
#include <sexpr/sexpr_parser.h>

View File

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

View File

@ -21,7 +21,7 @@
* 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_file_utils.h>

View File

@ -21,7 +21,7 @@
* 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_file_utils.h>

View File

@ -32,7 +32,7 @@
#include <common.h>
#include <pcbnew_utils/board_construction_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 )

View File

@ -26,7 +26,7 @@
* 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>

View File

@ -26,7 +26,7 @@
* 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

View File

@ -21,7 +21,7 @@
* 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_plugin.h>

View File

@ -23,7 +23,7 @@
#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 <pcbnew/pcb_expr_evaluator.h>

View File

@ -21,7 +21,7 @@
* 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>

View File

@ -21,7 +21,7 @@
* 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 <footprint.h>

View File

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

View File

@ -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
)

View File

@ -24,8 +24,8 @@
#ifndef QA_UNIT_TEST_UTILS_GEOM__H
#define QA_UNIT_TEST_UTILS_GEOM__H
#include <unit_test_utils/numeric.h>
#include <unit_test_utils/unit_test_utils.h>
#include <qa_utils/numeric.h>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <math/box2.h>
#include <math/vector2d.h>

View File

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

View File

@ -21,7 +21,7 @@
* 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
{

View File

@ -21,7 +21,7 @@
* 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>

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
kicad2step_lib
unit_test_utils
qa_utils
${wxWidgets_LIBRARIES}
)

View File

@ -26,7 +26,7 @@
* 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
#include <pcb/base.h>