Changeset 18801 in josm for trunk/test/unit/org
- Timestamp:
- 2023-08-09T15:30:01+02:00 (15 months ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/protobuf/ProtobufPackedTest.java
r18695 r18801 3 3 4 4 import static org.junit.jupiter.api.Assertions.assertArrayEquals; 5 6 import java.io.ByteArrayOutputStream;7 5 8 6 import org.junit.jupiter.api.Test; … … 14 12 @Test 15 13 void testSingleByteNumbers() { 16 long[] numbers = new ProtobufPacked( new ByteArrayOutputStream(),ProtobufTest.toByteArray(new int[]{0, 0, 1, 1, 2, 2, 3, 3, 4, 4}))14 long[] numbers = new ProtobufPacked(ProtobufTest.toByteArray(new int[]{0, 0, 1, 1, 2, 2, 3, 3, 4, 4})) 17 15 .getArray(); 18 16 assertArrayEquals(new long[] {0, 0, 1, 1, 2, 2, 3, 3, 4, 4}, numbers); … … 22 20 void testMultipleByteNumbers() { 23 21 byte[] bytes = ProtobufTest.toByteArray(new int[] {-128, 64, -18, 49, -70, 3}); 24 long[] numbers = new ProtobufPacked( new ByteArrayOutputStream(),bytes).getArray();22 long[] numbers = new ProtobufPacked(bytes).getArray(); 25 23 assertArrayEquals(new long[] {8192, 6382, 442}, numbers); 26 24 } -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DirectionNodesTest.java
r18690 r18801 10 10 11 11 /** 12 * JUnit Test of Multipolygonvalidation test.12 * JUnit Test of {@link DirectionNodes} validation test. 13 13 */ 14 14 class DirectionNodesTest { 15 16 15 17 16 /** … … 27 26 */ 28 27 @Test 29 void testDirection sNodesTestFile() throws Exception {28 void testDirectionNodesTestFile() throws Exception { 30 29 final DirectionNodes test = new DirectionNodes(); 31 30 ValidatorTestUtils.testSampleFile("nodist/data/direction-nodes.osm", DataSet::getNodes, null, test); -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWayTest.java
r18690 r18801 23 23 24 24 /** 25 * JUnit Test of Multipolygonvalidation test.25 * JUnit Test of {@link SelfIntersectingWay} validation test. 26 26 */ 27 27 class SelfIntersectingWayTest { -
trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java
r18037 r18801 7 7 8 8 import java.io.ByteArrayInputStream; 9 import java.io.File;10 9 import java.io.FileInputStream; 11 10 import java.io.IOException; … … 39 38 public static GpxData parseGpxData(String filename) throws IOException, SAXException { 40 39 final GpxData result; 41 try (FileInputStream in = new FileInputStream( new File(filename))) {40 try (FileInputStream in = new FileInputStream(filename)) { 42 41 GpxReader reader = new GpxReader(in); 43 42 assertTrue(reader.parse(false)); -
trunk/test/unit/org/openstreetmap/josm/testutils/mockers/EDTAssertionMocker.java
r17090 r18801 17 17 final Throwable cause = t.getCause(); 18 18 if (cause instanceof AssertionError) { 19 throw (AssertionError)cause;19 throw cause; 20 20 } 21 21
Note:
See TracChangeset
for help on using the changeset viewer.