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", {} },
141 BOOST_TEST_CONTEXT( wxString::Format( wxT(
"'%s' -> '%s'" ), c.input, c.exp_result ) )
146 BOOST_CHECK_EQUAL( result, c.exp_result );
161 {
"A=B",
"A=B", {} },
162 {
"A=B+C",
"A=B+C", {} },
163 {
"A\nB",
"A\nB", {} },
164 {
"A\tB",
"A\tB", {} },
165 {
"This is a long text with spaces",
"This is a long text with spaces", {} },
169 {
"'A'",
"'A'", {} },
173 {
"${A}",
"${A}", {} },
175 {
".A",
"${A}", {} },
176 {
".A",
"${C}", { {
"A",
"C" } } },
177 {
".A_B",
"${A_B}", {} },
185 {
".A",
"${C}", { {
"A",
"C" } } },
186 {
".a",
"${C}", { {
"A",
"C" } } },
187 {
".AB",
"${C}", { {
"AB",
"C" } } },
188 {
".aB",
"${C}", { {
"AB",
"C" } } },
189 {
".Ab",
"${C}", { {
"AB",
"C" } } },
190 {
".ab",
"${C}", { {
"AB",
"C" } } },
194 {
". ",
"${ }", {} },
195 {
". A",
"${ A}", {} },
196 {
".A ",
"${A }", {} },
197 {
" .A",
" .A", {} },
198 {
"...",
"${..}", {} },
209 BOOST_TEST_CONTEXT( wxString::Format( wxT(
"'%s' -> '%s'" ), c.input, c.exp_result ) )
214 BOOST_CHECK_EQUAL( result, c.exp_result );
219BOOST_AUTO_TEST_SUITE_END()
wxString AltiumSchSpecialStringsToKiCadVariables(const wxString &aString, const std::map< wxString, wxString > &aOverrides)
wxString AltiumPcbSpecialStringsToKiCadStrings(const wxString &aString, const std::map< wxString, wxString > &aOverrides)
ALTIUM_PARSER_UTILS_FIXTURE()
Declares the struct as the Boost test fixture.
static const std::vector< SPECIAL_STRINGS_TO_KICAD > sch_special_string_to_kicad_property
A list of valid test strings and the expected results.
BOOST_AUTO_TEST_CASE(AltiumSchSpecialStringsToKiCadVariablesProperties)
Test conversation from Altium Schematic Special String to a KiCad String with variables.
static const std::vector< SPECIAL_STRINGS_TO_KICAD > pcb_special_string_to_kicad_property
A list of valid test strings and the expected results.
#define BOOST_TEST_CONTEXT(A)