49 std::map<wxString, wxString>
override;
63 {
"A=B+C",
"A=B+C", {} },
64 {
"A\nB",
"A\nB", {} },
65 {
"A\tB",
"A\tB", {} },
66 {
"This is a long text with spaces",
"This is a long text with spaces", {} },
77 {
"${A}",
"${A}", {} },
80 {
"=A",
"${C}", { {
"A",
"C" } } },
81 {
"=A_B",
"${A_B}", {} },
83 {
"=A+B",
"${A}${B}", {} },
84 {
"=A+B",
"${A}${B}", {} },
85 {
"=A+B",
"${C}${B}", { {
"A",
"C" } } },
86 {
"=A+B",
"${C}${D}", { {
"A",
"C" }, {
"B",
"D" } } },
88 {
"=A",
"${C}", { {
"A",
"C" } } },
89 {
"=a",
"${C}", { {
"A",
"C" } } },
90 {
"=AB",
"${C}", { {
"AB",
"C" } } },
91 {
"=aB",
"${C}", { {
"AB",
"C" } } },
92 {
"=Ab",
"${C}", { {
"AB",
"C" } } },
93 {
"=ab",
"${C}", { {
"AB",
"C" } } },
96 {
"='This is a long text with spaces'",
"This is a long text with spaces", {} },
102 {
"='${A}'",
"${A}", {} },
103 {
"='A'+'B'",
"AB", {} },
104 {
"='A'+' '",
"A ", {} },
105 {
"=' '+'B'",
" B", {} },
106 {
"='A'+B",
"A${B}", {} },
107 {
"='A'+\"B\"",
"A${B}", {} },
108 {
"='A' + \"B\"",
"A${B}", {} },
109 {
"=\"A\"+'B'",
"${A}B", {} },
110 {
"=\"A\" + 'B'",
"${A}B", {} },
111 {
"=A+'B'",
"${A}B", {} },
112 {
"=A+' '+B",
"${A} ${B}", {} },
113 {
"='A'+B+'C'+D",
"A${B}C${D}", {} },
118 {
"=B+",
"${B}", {} },
119 {
"=+B",
"${B}", {} },
120 {
"=B++",
"${B}", {} },
121 {
"=+B+",
"${B}", {} },
122 {
"=++B",
"${B}", {} },
125 {
"= A",
"${A}", {} },
126 {
"=A ",
"${A}", {} },
127 {
"='A'B",
"A", {} },
128 {
"=A'B'",
"B", {} },
130 {
"=A+ 'B'",
"${A}B", {} },
146 BOOST_CHECK_EQUAL( result, c.exp_result );
151BOOST_AUTO_TEST_SUITE_END()
wxString AltiumSpecialStringsToKiCadVariables(const wxString &aString, const std::map< wxString, wxString > &aOverrides)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
ALTIUM_PARSER_UTILS_FIXTURE()
Declares the struct as the Boost test fixture.
BOOST_AUTO_TEST_CASE(AltiumSpecialStringsToKiCadVariablesProperties)
Test conversation from Altium Special String to a KiCad String with variables.
static const std::vector< SPECIAL_STRINGS_TO_KICAD > special_string_to_kicad_property
A list of valid test strings and the expected results.
#define BOOST_TEST_CONTEXT(A)