44 std::map<wxString, std::set<wxString>> candidates;
55 std::map<wxString, wxString>
result;
57 for(
const auto& [source, names] : candidates )
59 if( names.size() == 1 )
61 result.emplace( source, *names.begin() );
65 aReporter.
Report( wxString::Format(
_(
"Ambiguous imported net name '%s'; board net rename "
72 std::map<wxString, int> claims;
74 for(
const auto& [source, target] :
result )
79 if( claims[it->second] > 1 )
81 aReporter.
Report( wxString::Format(
_(
"Imported net name '%s' is claimed by more than one "
82 "source net; board net rename omitted." ), it->second ),
std::ostream & operator<<(std::ostream &aStream, IMPORT_NET_STATUS aStatus)
Name the status, so test diagnostics read as a status rather than an ordinal.
std::map< wxString, wxString > GetBoardNetNameMap(const IMPORT_NET_MAP &aMap, REPORTER &aReporter)
Reduce the map to the board net renames it justifies.
wxString result
Test unit parsing edge cases and error handling.