private void getEntries(String title, ICollection <KeyValuePair <Integer, String> > m1entries, ICollection <KeyValuePair <Integer, String> > m2entries, StringBuilder buffer, int limit) { ISet <KeyValuePair <Integer, String> > m1_m2 = new JCG.SortedSet <KeyValuePair <Integer, String> >(ENTRY_COMPARATOR); m1_m2.UnionWith(m1entries); m1_m2.ExceptWith(m2entries); buffer.Append(title + ": " + m1_m2.Count + "\r\n"); foreach (var entry in m1_m2) { if (limit-- < 0) { return; } buffer.Append(entry.Key).Append(" => ") .Append(entry.Value).Append("\r\n"); } }
public static bool VerifySetsIdentical(AbstractTestLog here, ISet <T> values1, ISet <T> values2) { if (SetEqualityComparer <T> .Aggressive.Equals(values1, values2)) { return(true); } ISet <T> temp; TestFmwk.Errln("Values differ:"); TestFmwk.Errln("UnicodeMap - HashMap"); temp = new JCG.SortedSet <T>(values1, JCG.Comparer <T> .Default); temp.ExceptWith(values2); TestFmwk.Errln(Show(temp)); TestFmwk.Errln("HashMap - UnicodeMap"); temp = new JCG.SortedSet <T>(values2, JCG.Comparer <T> .Default); temp.ExceptWith(values1); TestFmwk.Errln(Show(temp)); return(false); }