KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_sch_api_enums.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
* @author Jon Evans <
[email protected]
>
6
*
7
* This program is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU General Public License as published by the
9
* Free Software Foundation, either version 3 of the License, or (at your
10
* option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License along
18
* with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#include <boost/test/unit_test.hpp>
22
#include <magic_enum.hpp>
23
#include <
import_export.h
>
24
#include <
qa_utils/api_test_utils.h
>
25
26
#include <
api/api_enums.h
>
27
#include <api/schematic/schematic_types.pb.h>
28
#include <
lib_symbol.h
>
29
30
#include <
sch_label.h
>
31
#include <
sch_sheet_pin.h
>
32
33
34
BOOST_AUTO_TEST_SUITE
( ApiSchEnums )
35
36
using namespace
kiapi::schematic;
37
38
BOOST_AUTO_TEST_CASE
( SchematicLabelShape )
39
{
40
testEnums<LABEL_FLAG_SHAPE, types::SchematicLabelShape>
();
41
}
42
43
BOOST_AUTO_TEST_CASE
( SchematicLabelSpinStyle )
44
{
45
testEnums<SPIN_STYLE::SPIN, types::SchematicLabelSpinStyle>
();
46
}
47
48
BOOST_AUTO_TEST_CASE
( SheetSide )
49
{
50
testEnums<SHEET_SIDE, types::SheetSide>
(
true
);
51
}
52
53
BOOST_AUTO_TEST_CASE
( SchematicSymbolType )
54
{
55
testEnums<LIBRENTRYOPTIONS, types::SchematicSymbolType>
();
56
}
57
58
BOOST_AUTO_TEST_CASE
( SchematicSymbolOrientation )
59
{
60
testEnums<SYMBOL_ORIENTATION_PROP, types::SchematicSymbolOrientation>
();
61
}
62
63
BOOST_AUTO_TEST_CASE
( SchematicPinOrientation )
64
{
65
testEnums<PIN_ORIENTATION, types::SchematicPinOrientation>
(
true
);
66
}
67
68
BOOST_AUTO_TEST_CASE
( SchematicPinShape )
69
{
70
testEnums<GRAPHIC_PINSHAPE, types::SchematicPinShape>
(
true
);
71
}
72
73
BOOST_AUTO_TEST_SUITE_END
()
api_enums.h
api_test_utils.h
testEnums
void testEnums(bool aPartiallyMapped=false)
Checks if a KiCad enum has been properly mapped to a Protobuf enum.
Definition
api_test_utils.h:42
import_export.h
lib_symbol.h
sch_label.h
sch_sheet_pin.h
BOOST_AUTO_TEST_SUITE
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(SchematicLabelShape)
Definition
test_sch_api_enums.cpp:38
src
qa
tests
eeschema
test_sch_api_enums.cpp
Generated on Sun Apr 26 2026 00:06:58 for KiCad PCB EDA Suite by
1.13.2