Changeset 14966 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2019-04-07T07:54:49+02:00 (6 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/data/validation/tests
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java
r12663 r14966 38 38 for (T t: provider.apply(OsmReader.parseDataSet(is, null))) { 39 39 String name = DefaultNameFormatter.getInstance().format(t); 40 List<TestError> errors = new ArrayList<>(); 41 for (Test test : tests) { 42 test.initialize(); 43 test.startTest(null); 44 test.visit(Collections.singleton(t)); 45 test.endTest(); 46 errors.addAll(test.getErrors()); 47 } 40 48 String codes = t.get("josm_error_codes"); 41 49 if (codes != null) { 42 List<TestError> errors = new ArrayList<>();43 for (Test test : tests) {44 test.initialize();45 test.startTest(null);46 test.visit(Collections.singleton(t));47 test.endTest();48 errors.addAll(test.getErrors());49 }50 50 Set<Integer> expectedCodes = new TreeSet<>(); 51 51 if (!"none".equals(codes)) { … … 65 65 } else if (t.hasKey("name") && namePredicate != null && namePredicate.test(t.getName())) { 66 66 fail(name + " lacks josm_error_codes tag"); 67 } else if (t.hasKey("name") && name.startsWith("OK") && !errors.isEmpty()) { 68 fail(name + "has unexpected error(s) "); 67 69 } 68 70 }
Note:
See TracChangeset
for help on using the changeset viewer.