KiCad PCB EDA Suite
Loading...
Searching...
No Matches
group_saveload.cpp File Reference
#include <bitset>
#include <filesystem>
#include <string>
#include <board.h>
#include <footprint.h>
#include <pcb_group.h>
#include <pcb_text.h>
#include <common.h>
#include <pcbnew_utils/board_construction_utils.h>
#include <pcbnew_utils/board_file_utils.h>
#include <qa_utils/wx_utils/unit_test_utils.h>

Go to the source code of this file.

Enumerations

enum  ItemType {
  TEXT0 , TEXT1 , TEXT2 , TEXT3 ,
  TEXT4 , TEXT5 , TEXT6 , TEXT7 ,
  TEXT8 , REMOVED_TEXT , GROUP0 , GROUP1 ,
  GROUP2 , NAME_GROUP3 , NAME_GROUP4 , NAME_GROUP3_DUP ,
  REMOVED_GROUP , NUM_ITEMS
}
 

Functions

std::unique_ptr< BOARDcreateBoard (const std::vector< std::vector< ItemType > > &spec)
 
void testGroupEqual (const PCB_GROUP &group1, const PCB_GROUP &group2)
 
void testGroupsEqual (const GROUPS &groups1, const GROUPS &groups2)
 
void testSaveLoad (const std::vector< std::vector< ItemType > > &spec)
 
 BOOST_AUTO_TEST_CASE (HealthyGroups)
 
 BOOST_AUTO_TEST_CASE (InvalidGroups)
 

Variables

static PCB_TEXTs_removedText = nullptr
 
static PCB_GROUPs_removedGroup = nullptr
 

Enumeration Type Documentation

◆ ItemType

enum ItemType
Enumerator
TEXT0 
TEXT1 
TEXT2 
TEXT3 
TEXT4 
TEXT5 
TEXT6 
TEXT7 
TEXT8 
REMOVED_TEXT 
GROUP0 
GROUP1 
GROUP2 
NAME_GROUP3 
NAME_GROUP4 
NAME_GROUP3_DUP 
REMOVED_GROUP 
NUM_ITEMS 

Definition at line 42 of file group_saveload.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( HealthyGroups  )

Definition at line 224 of file group_saveload.cpp.

References GROUP0, GROUP1, NAME_GROUP3, testSaveLoad(), TEXT0, TEXT1, TEXT2, and TEXT3.

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( InvalidGroups  )

◆ createBoard()

std::unique_ptr< BOARD > createBoard ( const std::vector< std::vector< ItemType > > &  spec)

◆ testGroupEqual()

void testGroupEqual ( const PCB_GROUP group1,
const PCB_GROUP group2 
)

◆ testGroupsEqual()

void testGroupsEqual ( const GROUPS &  groups1,
const GROUPS &  groups2 
)

Definition at line 188 of file group_saveload.cpp.

References testGroupEqual().

Referenced by testSaveLoad().

◆ testSaveLoad()

void testSaveLoad ( const std::vector< std::vector< ItemType > > &  spec)

Variable Documentation

◆ s_removedGroup

PCB_GROUP* s_removedGroup = nullptr
static

Definition at line 68 of file group_saveload.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and createBoard().

◆ s_removedText

PCB_TEXT* s_removedText = nullptr
static

Definition at line 67 of file group_saveload.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and createBoard().