- Timestamp:
- 2016-03-30T00:35:59+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LongSegmentTest.java
r10080 r10081 2 2 package org.openstreetmap.josm.data.validation.tests; 3 3 4 import static org.junit.Assert.assert True;4 import static org.junit.Assert.assertEquals; 5 5 6 6 import org.junit.Before; … … 24 24 } 25 25 26 private static boolean test(int expected,Way w) throws Exception {26 private static int test(Way w) throws Exception { 27 27 LongSegment test = new LongSegment(); 28 28 test.initialize(); … … 30 30 test.visit(w); 31 31 test.endTest(); 32 return test.getErrors().size() == expected;32 return test.getErrors().size(); 33 33 } 34 34 … … 45 45 // https://www.openstreetmap.org/node/468120683 46 46 w.addNode(new Node(new LatLon(54.5737391, 11.9246324))); 47 assert True(test(1,w));47 assertEquals(1, test(w)); 48 48 49 49 // Ferry route 50 50 w.put("route", "ferry"); 51 assert True(test(0,w));51 assertEquals(0, test(w)); 52 52 53 53 // Short way … … 55 55 w.addNode(new Node(new LatLon(54.152, 12.097))); 56 56 w.addNode(new Node(new LatLon(54.153, 12.098))); 57 assert True(test(0,w));57 assertEquals(0, test(w)); 58 58 } 59 59 }
Note:
See TracChangeset
for help on using the changeset viewer.