| 
    KiCad PCB EDA Suite
    
   | 
 
#include <boost/test/unit_test.hpp>#include <boost/bimap.hpp>#include <magic_enum.hpp>#include <import_export.h>#include <qa_utils/wx_utils/wx_assert.h>#include <api/api_enums.h>#include <api/common/types/enums.pb.h>#include <core/typeinfo.h>#include <font/text_attributes.h>#include <layer_ids.h>#include <stroke_params.h>#include <widgets/report_severity.h>#include <api/board/board_types.pb.h>#include <api/board/board_commands.pb.h>#include <board_stackup_manager/board_stackup.h>#include <padstack.h>#include <pcb_dimension.h>#include <pcb_track.h>#include <project/board_project_settings.h>#include <zones.h>#include <zone_settings.h>Go to the source code of this file.
Functions | |
| template<typename KiCadEnum, typename ProtoEnum> | |
| void | testEnums (bool aPartiallyMapped=false) | 
| Checks if a KiCad enum has been properly mapped to a Protobuf enum.   | |
| BOOST_AUTO_TEST_CASE (HorizontalAlignment) | |
| BOOST_AUTO_TEST_CASE (VerticalAlignment) | |
| BOOST_AUTO_TEST_CASE (StrokeLineStyle) | |
| BOOST_AUTO_TEST_CASE (KiCadObjectType) | |
| BOOST_AUTO_TEST_CASE (BoardLayer) | |
| BOOST_AUTO_TEST_CASE (PadStackShape) | |
| BOOST_AUTO_TEST_CASE (ZoneConnectionStyle) | |
| BOOST_AUTO_TEST_CASE (PadType) | |
| BOOST_AUTO_TEST_CASE (PadStackType) | |
| BOOST_AUTO_TEST_CASE (DrillShape) | |
| BOOST_AUTO_TEST_CASE (UnconnectedLayerRemoval) | |
| BOOST_AUTO_TEST_CASE (ViaType) | |
| BOOST_AUTO_TEST_CASE (IslandRemovalMode) | |
| BOOST_AUTO_TEST_CASE (ZoneFillMode) | |
| BOOST_AUTO_TEST_CASE (ZoneBorderStyle) | |
| BOOST_AUTO_TEST_CASE (PlacementRuleSourceType) | |
| BOOST_AUTO_TEST_CASE (TeardropType) | |
| BOOST_AUTO_TEST_CASE (DimensionTextBorderStyle) | |
| BOOST_AUTO_TEST_CASE (DimensionUnitFormat) | |
| BOOST_AUTO_TEST_CASE (DimensionArrowDirection) | |
| BOOST_AUTO_TEST_CASE (DimensionPrecision) | |
| BOOST_AUTO_TEST_CASE (DimensionTextPosition) | |
| BOOST_AUTO_TEST_CASE (DimensionUnit) | |
| BOOST_AUTO_TEST_CASE (InactiveLayerDisplayMode) | |
| BOOST_AUTO_TEST_CASE (NetColorDisplayMode) | |
| BOOST_AUTO_TEST_CASE (RatsnestDisplayMode) | |
| BOOST_AUTO_TEST_CASE (BoardStackupLayerType) | |
| BOOST_AUTO_TEST_CASE (DrcSeverity) | |
| BOOST_AUTO_TEST_CASE | ( | BoardLayer | ) | 
Definition at line 155 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | BoardStackupLayerType | ) | 
Definition at line 266 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | DimensionArrowDirection | ) | 
Definition at line 231 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | DimensionPrecision | ) | 
Definition at line 236 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | DimensionTextBorderStyle | ) | 
Definition at line 221 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | DimensionTextPosition | ) | 
Definition at line 241 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | DimensionUnit | ) | 
Definition at line 246 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | DimensionUnitFormat | ) | 
Definition at line 226 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | DrcSeverity | ) | 
Definition at line 271 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | DrillShape | ) | 
Definition at line 180 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | HorizontalAlignment | ) | 
Definition at line 135 of file test_api_enums.cpp.
References testEnums().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| BOOST_AUTO_TEST_CASE | ( | InactiveLayerDisplayMode | ) | 
Definition at line 251 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | IslandRemovalMode | ) | 
Definition at line 196 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | KiCadObjectType | ) | 
Definition at line 150 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | NetColorDisplayMode | ) | 
Definition at line 256 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | PadStackShape | ) | 
Definition at line 160 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | PadStackType | ) | 
Definition at line 175 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | PadType | ) | 
Definition at line 170 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | PlacementRuleSourceType | ) | 
Definition at line 211 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | RatsnestDisplayMode | ) | 
Definition at line 261 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | StrokeLineStyle | ) | 
Definition at line 145 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | TeardropType | ) | 
Definition at line 216 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | UnconnectedLayerRemoval | ) | 
Definition at line 185 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | VerticalAlignment | ) | 
Definition at line 140 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | ViaType | ) | 
Definition at line 190 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | ZoneBorderStyle | ) | 
Definition at line 206 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | ZoneConnectionStyle | ) | 
Definition at line 165 of file test_api_enums.cpp.
References testEnums().
| BOOST_AUTO_TEST_CASE | ( | ZoneFillMode | ) | 
Definition at line 201 of file test_api_enums.cpp.
References testEnums().
| void testEnums | ( | bool | aPartiallyMapped = false | ) | 
Checks if a KiCad enum has been properly mapped to a Protobuf enum.
| KiCadEnum | is an enum type | 
| ProtoEnum | is a Protobuf enum type | 
| aPartiallyMapped | is true if only some of the KiCad enum values are exposed to the API | 
Definition at line 57 of file test_api_enums.cpp.
References BOOST_REQUIRE(), BOOST_TEST_CONTEXT(), FromProtoEnum(), name, result, and ToProtoEnum().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().