KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_api_enums.cpp File Reference
#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 <api/board/board_types.pb.h>
#include <core/typeinfo.h>
#include <font/text_attributes.h>
#include <layer_ids.h>
#include <stroke_params.h>
#include <padstack.h>
#include <pcb_dimension.h>
#include <pcb_track.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)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/23]

BOOST_AUTO_TEST_CASE ( BoardLayer  )

Definition at line 151 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/23]

BOOST_AUTO_TEST_CASE ( DimensionArrowDirection  )

Definition at line 227 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [3/23]

BOOST_AUTO_TEST_CASE ( DimensionPrecision  )

Definition at line 232 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [4/23]

BOOST_AUTO_TEST_CASE ( DimensionTextBorderStyle  )

Definition at line 217 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [5/23]

BOOST_AUTO_TEST_CASE ( DimensionTextPosition  )

Definition at line 237 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [6/23]

BOOST_AUTO_TEST_CASE ( DimensionUnit  )

Definition at line 242 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [7/23]

BOOST_AUTO_TEST_CASE ( DimensionUnitFormat  )

Definition at line 222 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [8/23]

BOOST_AUTO_TEST_CASE ( DrillShape  )

Definition at line 176 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [9/23]

BOOST_AUTO_TEST_CASE ( HorizontalAlignment  )

Definition at line 131 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [10/23]

BOOST_AUTO_TEST_CASE ( IslandRemovalMode  )

Definition at line 192 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [11/23]

BOOST_AUTO_TEST_CASE ( KiCadObjectType  )

Definition at line 146 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [12/23]

BOOST_AUTO_TEST_CASE ( PadStackShape  )

Definition at line 156 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [13/23]

BOOST_AUTO_TEST_CASE ( PadStackType  )

Definition at line 171 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [14/23]

BOOST_AUTO_TEST_CASE ( PadType  )

Definition at line 166 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [15/23]

BOOST_AUTO_TEST_CASE ( PlacementRuleSourceType  )

Definition at line 207 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [16/23]

BOOST_AUTO_TEST_CASE ( StrokeLineStyle  )

Definition at line 141 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [17/23]

BOOST_AUTO_TEST_CASE ( TeardropType  )

Definition at line 212 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [18/23]

BOOST_AUTO_TEST_CASE ( UnconnectedLayerRemoval  )

Definition at line 181 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [19/23]

BOOST_AUTO_TEST_CASE ( VerticalAlignment  )

Definition at line 136 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [20/23]

BOOST_AUTO_TEST_CASE ( ViaType  )

Definition at line 186 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [21/23]

BOOST_AUTO_TEST_CASE ( ZoneBorderStyle  )

Definition at line 202 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [22/23]

BOOST_AUTO_TEST_CASE ( ZoneConnectionStyle  )

Definition at line 161 of file test_api_enums.cpp.

◆ BOOST_AUTO_TEST_CASE() [23/23]

BOOST_AUTO_TEST_CASE ( ZoneFillMode  )

Definition at line 197 of file test_api_enums.cpp.

◆ testEnums()

template<typename KiCadEnum , typename ProtoEnum >
void testEnums ( bool  aPartiallyMapped = false)

Checks if a KiCad enum has been properly mapped to a Protobuf enum.

Template Parameters
KiCadEnumis an enum type
ProtoEnumis a Protobuf enum type
Parameters
aPartiallyMappedis true if only some of the KiCad enum values are exposed to the API

Definition at line 53 of file test_api_enums.cpp.

References name.