KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_types.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.TXT for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
21
22// Code under test
23#include <core/typeinfo.h>
25#include <properties/property.h>
26
27
32
33
34// Make sure all available `KICAD_T` values are categorized properly.
36{
37 for( int i = 0; i < MAX_STRUCT_TYPE_ID; i++ )
38 {
39 KICAD_T type = static_cast<KICAD_T>( i );
40
41 BOOST_CHECK_MESSAGE( IsTypeCorrect( type ), "Type " << type << " is not assigned to an application in typeinfo.h" );
42 }
43}
44
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition typeinfo.h:71
@ MAX_STRUCT_TYPE_ID
Definition typeinfo.h:240
constexpr bool IsTypeCorrect(KICAD_T aType)
Definition typeinfo.h:549