30#include <boost/test/data/test_case.hpp> 
   50    std::map<wxString, wxString> 
override;
 
 
   68    { 
"A=B+C", 
"A=B+C", {} },
 
   69    { 
"A\nB", 
"A\nB", {} },
 
   70    { 
"A\tB", 
"A\tB", {} },
 
   71    { 
"This is a long text with spaces", 
"This is a long text with spaces", {} },
 
   82    { 
"${A}", 
"${A}", {} }, 
 
   85    { 
"=A", 
"${C}", { { 
"A", 
"C" } } },
 
   86    { 
"=A_B", 
"${A_B}", {} },
 
   88    { 
"=A+B", 
"${A}${B}", {} },
 
   89    { 
"=A+B", 
"${A}${B}", {} },
 
   90    { 
"=A+B", 
"${C}${B}", { { 
"A", 
"C" } } },
 
   91    { 
"=A+B", 
"${C}${D}", { { 
"A", 
"C" }, { 
"B", 
"D" } } },
 
   93    { 
"=A", 
"${C}", { { 
"A", 
"C" } } },
 
   94    { 
"=a", 
"${C}", { { 
"A", 
"C" } } },
 
   95    { 
"=AB", 
"${C}", { { 
"AB", 
"C" } } },
 
   96    { 
"=aB", 
"${C}", { { 
"AB", 
"C" } } },
 
   97    { 
"=Ab", 
"${C}", { { 
"AB", 
"C" } } },
 
   98    { 
"=ab", 
"${C}", { { 
"AB", 
"C" } } },
 
  101    { 
"='This is a long text with spaces'", 
"This is a long text with spaces", {} },
 
  107    { 
"='${A}'", 
"${A}", {} }, 
 
  108    { 
"='A'+'B'", 
"AB", {} },
 
  109    { 
"='A'+' '", 
"A ", {} },
 
  110    { 
"=' '+'B'", 
" B", {} },
 
  111    { 
"='A'+B", 
"A${B}", {} },
 
  112    { 
"='A'+\"B\"", 
"A${B}", {} },
 
  113    { 
"='A' + \"B\"", 
"A${B}", {} },
 
  114    { 
"=\"A\"+'B'", 
"${A}B", {} },
 
  115    { 
"=\"A\" + 'B'", 
"${A}B", {} },
 
  116    { 
"=A+'B'", 
"${A}B", {} },
 
  117    { 
"=A+' '+B", 
"${A} ${B}", {} },
 
  118    { 
"='A'+B+'C'+D", 
"A${B}C${D}", {} },
 
  123    { 
"=B+", 
"${B}", {} },
 
  124    { 
"=+B", 
"${B}", {} },
 
  125    { 
"=B++", 
"${B}", {} },
 
  126    { 
"=+B+", 
"${B}", {} },
 
  127    { 
"=++B", 
"${B}", {} },
 
  130    { 
"= A", 
"${A}", {} },
 
  131    { 
"=A ", 
"${A}", {} },
 
  132    { 
"='A'B", 
"A", {} },
 
  133    { 
"=A'B'", 
"B", {} },
 
  135    { 
"=A+ 'B'", 
"${A}B", {} },
 
 
  163    { 
"A=B", 
"A=B", {} },
 
  164    { 
"A=B+C", 
"A=B+C", {} },
 
  165    { 
"A\nB", 
"A\nB", {} },
 
  166    { 
"A\tB", 
"A\tB", {} },
 
  167    { 
"This is a long text with spaces", 
"This is a long text with spaces", {} },
 
  171    { 
"'A'", 
"'A'", {} },
 
  175    { 
"${A}", 
"${A}", {} }, 
 
  177    { 
".A", 
"${A}", {} },
 
  178    { 
".A", 
"${C}", { { 
"A", 
"C" } } },
 
  179    { 
".A_B", 
"${A_B}", {} },
 
  181    { 
"'.A'", 
"${A}", {} },
 
  182    { 
"'.A''.B'", 
"${A}${B}", {} },
 
  183    { 
"'.A''.B'", 
"${C}${B}", { { 
"A", 
"C" } } },
 
  184    { 
"'.A''.B'", 
"${CC}${D}", { { 
"A", 
"CC" }, { 
"B", 
"D" } } },
 
  185    { 
"A='.A', B='.B'", 
"A=${A}, B=${B}", {} },
 
  187    { 
".A", 
"${C}", { { 
"A", 
"C" } } },
 
  188    { 
".a", 
"${C}", { { 
"A", 
"C" } } },
 
  189    { 
".AB", 
"${C}", { { 
"AB", 
"C" } } },
 
  190    { 
".aB", 
"${C}", { { 
"AB", 
"C" } } },
 
  191    { 
".Ab", 
"${C}", { { 
"AB", 
"C" } } },
 
  192    { 
".ab", 
"${C}", { { 
"AB", 
"C" } } },
 
  196    { 
". ", 
"${ }", {} },
 
  197    { 
". A", 
"${ A}", {} },
 
  198    { 
".A ", 
"${A }", {} },
 
  199    { 
" .A", 
" .A", {} },
 
  200    { 
"...", 
"${..}", {} },
 
 
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.
 
BOOST_DATA_TEST_CASE(AltiumSchSpecialStringsToKiCadVariablesProperties, boost::unit_test::data::make(sch_special_string_to_kicad_property), data)
Test conversation from Altium Schematic Special String to a KiCad String with variables.
 
static const std::vector< SPECIAL_STRINGS_TO_KICAD > sch_special_string_to_kicad_property
A list of valid test strings and the expected results.
 
std::ostream & operator<<(std::ostream &strm, SPECIAL_STRINGS_TO_KICAD const &data)
 
static const std::vector< SPECIAL_STRINGS_TO_KICAD > pcb_special_string_to_kicad_property
A list of valid test strings and the expected results.
 
BOOST_AUTO_TEST_SUITE_END()
 
wxString result
Test unit parsing edge cases and error handling.
 
BOOST_CHECK_EQUAL(result, "25.4")