46 using CASE = std::pair<wxString, wxString>;
50 const std::vector<CASE> cases = {
51 {
"v34_STM23G491\t\tController STM32\t(column 3)",
52 "v34_LPC1758\t\t\tController NXP\t\t(column 3)" },
53 {
"1\td9c1892a\t\t\tMOLEX\t\t\t1053071202\t\t\t\t\t12\t\tCONNECTOR",
54 "REF\tPART NUMBER\t\t\tMANUFACTURER\tMANUFACTURER PART NUMBER\tQTY\t\tCONNECTOR" },
55 {
"5\tC-000208\t\t\tMCMASTER/CARR\t8054T13 BLUE\t\t\t\t3960MM\tCONNECTOR",
56 "REF\tPART NUMBER\t\t\tMANUFACTURER\tMANUFACTURER PART NUMBER\tQTY\t\tCONNECTOR" },
57 {
"0\t\t\t\tlinvA\t\t\tL",
58 "3\t\t\t\tlloadA\t\t\tL" },
59 {
"6\t\t\t\tVpccA\t\t\tL",
60 "14\t\t\t\t--\t\t\t\tL" },
63 for(
const auto& c : cases )
65 std::vector<std::unique_ptr<KIFONT::GLYPH>> glyphs;
67 wxString text1 = wxString::Format( c.first );
68 wxString text2 = wxString::Format( c.second );
77 BOOST_CHECK_MESSAGE( output1.
x == output2.
x,
"Incorrect tab size for \n\t'" <<
78 text1.ToStdString() <<
"' and\n\t'" << text2.ToStdString() <<
"'" );
Implement a stroke font drawing.
static STROKE_FONT * LoadFont(const wxString &aFontName)
Load a stroke font.
VECTOR2I GetTextAsGlyphs(BOX2I *aBoundingBox, std::vector< std::unique_ptr< GLYPH > > *aGlyphs, const wxString &aText, const VECTOR2I &aSize, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle, bool aMirror, const VECTOR2I &aOrigin, TEXT_STYLE_FLAGS aTextStyle) const override
Convert text string to an array of GLYPHs.
static constexpr EDA_ANGLE ANGLE_0
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(TabCheck)
Declare the test suite.
VECTOR2< int32_t > VECTOR2I