KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_group_load_save.cpp File Reference
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/data/test_case.hpp>
#include <board.h>
#include <kiid.h>
#include <pcb_group.h>
#include <pcbnew_utils/board_file_utils.h>
#include <pcbnew_utils/board_test_utils.h>
#include <settings/settings_manager.h>

Go to the source code of this file.

Functions

 BOOST_DATA_TEST_CASE (GroupsLoadSave, boost::unit_test::data::make(GroupsLoadSave_testCases), testCase)
 This is similar to group_saveload.cpp's HealthyGroups, but runs the other way around: it loads a fixed board file and checks that the groups are loaded correctly.
 

Function Documentation

◆ BOOST_DATA_TEST_CASE()

BOOST_DATA_TEST_CASE ( GroupsLoadSave  ,
boost::unit_test::data::make(GroupsLoadSave_testCases)  ,
testCase   
)

This is similar to group_saveload.cpp's HealthyGroups, but runs the other way around: it loads a fixed board file and checks that the groups are loaded correctly.

This makes it a good place to check parsing of the board file format, as well as stability of the format even if it's saved at a newer format version and re-read.

But it's less good at programmatic generation of interesting groups in the first place.

Definition at line 97 of file test_group_load_save.cpp.

References BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), group, KI_TEST::LoadAndTestBoardFile(), PCB_GROUP_T, and KI_TEST::RequireBoardItemWithTypeAndId().