QA: Make a generic common test suite

* Renames /qa/common to /qa/qa_utils, as it is not to do with /common
* Renames /qa/geometry to /qa/common
* Put existing geometry tests into a subdirectory of /qa/common, to
  echo the layout of the main tree.

The intention is to provide a place to put tests of other libcommon
code in the /qa/common suite.
This commit is contained in:
John Beard 2018-09-25 12:11:10 +01:00 committed by Wayne Stambaugh
parent b487a8c70e
commit 9c78ef5784
11 changed files with 13 additions and 13 deletions

View File

@ -12,7 +12,7 @@ if( KICAD_SCRIPTING_MODULES )
endif() endif()
add_subdirectory( geometry ) add_subdirectory( common )
add_subdirectory( shape_poly_set_refactor ) add_subdirectory( shape_poly_set_refactor )
add_subdirectory( pcb_test_window ) add_subdirectory( pcb_test_window )
add_subdirectory( polygon_triangulation ) add_subdirectory( polygon_triangulation )

View File

@ -25,9 +25,9 @@ find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc R
add_definitions(-DBOOST_TEST_DYN_LINK) add_definitions(-DBOOST_TEST_DYN_LINK)
add_executable( qa_geometry add_executable( qa_common
test_module.cpp test_module.cpp
test_fillet.cpp geometry/test_fillet.cpp
) )
include_directories( include_directories(
@ -37,13 +37,13 @@ include_directories(
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
) )
target_link_libraries( qa_geometry target_link_libraries( qa_common
common common
polygon polygon
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
) )
add_test( NAME geometry add_test( NAME common
COMMAND qa_geometry COMMAND qa_common
) )

View File

@ -29,7 +29,7 @@
#include <algorithm> #include <algorithm>
#include <qa/geometry/geom_test_utils.h> #include "geom_test_utils.h"
struct FilletFixture struct FilletFixture
{ {

View File

@ -26,7 +26,7 @@
*/ */
#define BOOST_TEST_MAIN #define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE "Geometry module tests" #define BOOST_TEST_MODULE "Common library module tests"
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>

View File

@ -35,8 +35,8 @@ add_dependencies( pnsrouter pcbcommon pcad2kicadpcb ${GITHUB_PLUGIN_LIBRARIES} )
add_executable(test_window WIN32 add_executable(test_window WIN32
test.cpp test.cpp
../common/pcb_test_frame.cpp ../qa_utils/pcb_test_frame.cpp
../common/mocks.cpp ../qa_utils/mocks.cpp
../../common/base_units.cpp ../../common/base_units.cpp
../../pcbnew/tools/pcb_tool.cpp ../../pcbnew/tools/pcb_tool.cpp
../../pcbnew/tools/selection.cpp ../../pcbnew/tools/selection.cpp
@ -57,7 +57,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/pcbnew/dialogs ${CMAKE_SOURCE_DIR}/pcbnew/dialogs
${CMAKE_SOURCE_DIR}/polygon ${CMAKE_SOURCE_DIR}/polygon
${CMAKE_SOURCE_DIR}/common/geometry ${CMAKE_SOURCE_DIR}/common/geometry
${CMAKE_SOURCE_DIR}/qa/common ${CMAKE_SOURCE_DIR}/qa/qa_utils
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
${INC_AFTER} ${INC_AFTER}
) )

View File

@ -33,7 +33,7 @@ endif()
add_dependencies( pnsrouter pcbcommon pcad2kicadpcb ${GITHUB_PLUGIN_LIBRARIES} ) add_dependencies( pnsrouter pcbcommon pcad2kicadpcb ${GITHUB_PLUGIN_LIBRARIES} )
add_executable(test_polygon_generator add_executable(test_polygon_generator
../common/mocks.cpp ../qa_utils/mocks.cpp
../../common/base_units.cpp ../../common/base_units.cpp
test_polygon_generator.cpp test_polygon_generator.cpp
) )

View File

@ -33,7 +33,7 @@ endif()
add_dependencies( pnsrouter pcbcommon pcad2kicadpcb ${GITHUB_PLUGIN_LIBRARIES} ) add_dependencies( pnsrouter pcbcommon pcad2kicadpcb ${GITHUB_PLUGIN_LIBRARIES} )
add_executable(test_polygon_triangulation add_executable(test_polygon_triangulation
../common/mocks.cpp ../qa_utils/mocks.cpp
../../common/base_units.cpp ../../common/base_units.cpp
test_polygon_triangulation.cpp test_polygon_triangulation.cpp
) )