Add current vs expected

This commit is contained in:
Victor Shcherb 2021-04-21 17:23:08 +02:00
parent df3104b032
commit bc3a37b65f
2 changed files with 12 additions and 5 deletions

View file

@ -62,7 +62,7 @@ public class SearchResult {
double res = 1;
if (match) {
res = ObjectType.getTypeWeight(match ? objectType : null);
fullCompleteMatch = getSelfPhrase().equals(name);
fullCompleteMatch = getSelfPhrase().equalsIgnoreCase(name);
if (fullCompleteMatch) {
res = res * 10;
}

View file

@ -191,9 +191,16 @@ public class SearchUICoreTest {
if (!Algorithms.stringsEqual(expected, present)) {
System.out.println(String.format("Phrase: %s", phrase));
System.out.println(String.format("Mismatch for '%s' != '%s'. Result: ", expected, present));
}
System.out.println("CURRENT RESULTS: ");
for (SearchResult r : searchResults) {
System.out.println(String.format("\t\"%s\",", formatResult(false, r, phrase)));
}
System.out.println("EXPECTED : ");
for (String r : result) {
System.out.println(String.format("\t\"%s\",", r));
}
}
Assert.assertEquals(expected, present);
}