KiCad PCB EDA Suite
Loading...
Searching...
No Matches
api_test_utils.h File Reference
#include <boost/test/unit_test.hpp>
#include <boost/bimap.hpp>
#include <google/protobuf/any.pb.h>
#include <memory>
#include <set>
#include <magic_enum.hpp>
#include <api/api_enums.h>
#include <qa_utils/wx_utils/wx_assert.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.
 
template<typename ProtoClass, typename KiCadClass, typename Factory>
void testProtoFromKiCadObject (KiCadClass *aInput, Factory &&aCreateOutput)
 
template<typename ProtoClass, typename KiCadClass, typename ParentClass>
void testProtoFromKiCadObject (KiCadClass *aInput, ParentClass *aParent, bool aStrict=true)
 

Function Documentation

◆ 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 42 of file api_test_utils.h.

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(), 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().

◆ testProtoFromKiCadObject() [1/2]

template<typename ProtoClass, typename KiCadClass, typename Factory>
void testProtoFromKiCadObject ( KiCadClass * aInput,
Factory && aCreateOutput )

◆ testProtoFromKiCadObject() [2/2]

template<typename ProtoClass, typename KiCadClass, typename ParentClass>
void testProtoFromKiCadObject ( KiCadClass * aInput,
ParentClass * aParent,
bool aStrict = true )

Definition at line 153 of file api_test_utils.h.

References testProtoFromKiCadObject().