Ticket #16567: 16567.domainvalidatortestit.patch
| File 16567.domainvalidatortestit.patch, 3.2 KB (added by , 6 years ago) |
|---|
-
test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java
16 16 */ 17 17 package org.openstreetmap.josm.data.validation.routines; 18 18 19 import static org.junit. Assert.assertTrue;20 import static org.junit. Assert.fail;19 import static org.junit.jupiter.api.Assertions.assertTrue; 20 import static org.junit.jupiter.api.Assertions.fail; 21 21 22 22 import java.io.BufferedReader; 23 23 import java.io.Closeable; … … 142 142 } 143 143 } 144 144 } else { 145 System.err.println("Expected to find HTML info for "+ asciiTld);145 Logging.error("Expected to find HTML info for "+ asciiTld); 146 146 } 147 147 } 148 148 ianaTlds.add(asciiTld); … … 174 174 } 175 175 } 176 176 // Check if internal tables contain any additional entries 177 assertTrue(isInIanaList("INFRASTRUCTURE_TLDS", ianaTlds) );178 assertTrue(isInIanaList("COUNTRY_CODE_TLDS", ianaTlds) );179 assertTrue(isInIanaList("GENERIC_TLDS", ianaTlds) );177 assertTrue(isInIanaList("INFRASTRUCTURE_TLDS", ianaTlds), String.join(System.lineSeparator(), Logging.getLastErrorAndWarnings())); 178 assertTrue(isInIanaList("COUNTRY_CODE_TLDS", ianaTlds), String.join(System.lineSeparator(), Logging.getLastErrorAndWarnings())); 179 assertTrue(isInIanaList("GENERIC_TLDS", ianaTlds), String.join(System.lineSeparator(), Logging.getLastErrorAndWarnings())); 180 180 // Don't check local TLDS assertTrue(isInIanaList("LOCAL_TLDS", ianaTlds)); 181 181 } 182 182 … … 349 349 boolean ok = true; 350 350 for (int i = 0; i < array.length; i++) { 351 351 if (!ianaTlds.contains(array[i])) { 352 System.out.println(name + " contains unexpected value: " + array[i]);352 Logging.error(name + " contains unexpected value: " + array[i]); 353 353 ok = false; 354 354 } 355 355 } … … 387 387 final String nextEntry = array[i+1]; 388 388 final int cmp = entry.compareTo(nextEntry); 389 389 if (cmp > 0) { // out of order 390 System.out.println("Out of order entry: " + entry + " < " + nextEntry + " in " + name);390 Logging.error("Out of order entry: " + entry + " < " + nextEntry + " in " + name); 391 391 sorted = false; 392 392 } else if (cmp == 0) { 393 393 strictlySorted = false; 394 System.out.println("Duplicated entry: " + entry + " in " + name);394 Logging.error("Duplicated entry: " + entry + " in " + name); 395 395 } 396 396 if (!isLowerCase(entry)) { 397 System.out.println("Non lowerCase entry: " + entry + " in " + name);397 Logging.error("Non lowerCase entry: " + entry + " in " + name); 398 398 lowerCase = false; 399 399 } 400 400 }
