25#include <boost/test/unit_test.hpp>
39 std::string identifier =
"R1";
44 BOOST_CHECK( uuid1 == uuid2 );
56 BOOST_CHECK( uuid1 != uuid2 );
57 BOOST_CHECK( uuid1 != uuid3 );
58 BOOST_CHECK( uuid2 != uuid3 );
70 BOOST_CHECK( uuidStr[8] ==
'-' );
71 BOOST_CHECK( uuidStr[13] ==
'-' );
72 BOOST_CHECK( uuidStr[18] ==
'-' );
73 BOOST_CHECK( uuidStr[23] ==
'-' );
76 BOOST_CHECK( uuidStr[14] ==
'4' );
93 std::string longId =
"VERY_LONG_COMPONENT_NAME_WITH_LOTS_OF_CHARACTERS_12345";
101 BOOST_CHECK( uuid == uuid2 );
109 std::string schematicId =
"PADS:IC_QUAD_NAND/U1";
110 std::string pcbId =
"PADS:IC_QUAD_NAND/U1";
115 BOOST_CHECK( schUuid == pcbUuid );
266 BOOST_CHECK( !related.HasPcb() );
267 BOOST_CHECK( !related.HasSchematic() );
274 BOOST_CHECK( !
empty.HasPcb() );
275 BOOST_CHECK( !
empty.HasSchematic() );
276 BOOST_CHECK( !
empty.HasBoth() );
279 pcbOnly.
pcbFile = wxS(
"test.asc" );
280 BOOST_CHECK( pcbOnly.
HasPcb() );
282 BOOST_CHECK( !pcbOnly.
HasBoth() );
286 BOOST_CHECK( !schOnly.
HasPcb() );
288 BOOST_CHECK( !schOnly.
HasBoth() );
291 both.
pcbFile = wxS(
"test_pcb.asc" );
293 BOOST_CHECK( both.
HasPcb() );
wxString AsString() const
static bool empty(const wxTextEntryBase *aCtrl)
RELATED_FILES FindRelatedPadsFiles(const wxString &aFilePath)
Find related PADS project files from a given source file.
int ParseInt(const std::string &aStr, int aDefault, const std::string &aContext)
Parse integer from string with error context.
PADS_FILE_TYPE DetectPadsFileType(const wxString &aFilePath)
Detect the type of a PADS file by examining its header.
wxString ConvertInvertedNetName(const std::string &aNetName)
Convert a PADS net name to KiCad format, handling inverted signal notation.
LINE_STYLE PadsLineStyleToKiCad(int aPadsStyle)
Convert a PADS line style integer to a KiCad LINE_STYLE enum value.
KIID GenerateDeterministicUuid(const std::string &aIdentifier)
Generate a deterministic KIID from a PADS component identifier.
double ParseDouble(const std::string &aStr, double aDefault, const std::string &aContext)
Parse double from string with error context.
Common utilities and types for parsing PADS file formats.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(GenerateDeterministicUuid_Deterministic)
BOOST_CHECK_EQUAL(result, "25.4")