Changeset 18695 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2023-03-20T21:52:18+01:00 (20 months ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/protobuf/ProtobufTest.java
r18473 r18695 43 43 * @since 17862 44 44 */ 45 class ProtobufTest {45 public class ProtobufTest { 46 46 /** 47 47 * Convert an int array into a byte array … … 49 49 * @return A byte array that can be used 50 50 */ 51 static byte[] toByteArray(int[] intArray) {51 public static byte[] toByteArray(int[] intArray) { 52 52 byte[] byteArray = new byte[intArray.length]; 53 53 for (int i = 0; i < intArray.length; i++) { … … 202 202 @Test 203 203 void testZigZag() { 204 assertEquals(0, ProtobufParser.decodeZigZag( 0).intValue());205 assertEquals(-1, ProtobufParser.decodeZigZag( 1).intValue());206 assertEquals(1, ProtobufParser.decodeZigZag( 2).intValue());207 assertEquals(-2, ProtobufParser.decodeZigZag( 3).intValue());204 assertEquals(0, ProtobufParser.decodeZigZag(Integer.valueOf(0)).intValue()); 205 assertEquals(-1, ProtobufParser.decodeZigZag(Integer.valueOf(1)).intValue()); 206 assertEquals(1, ProtobufParser.decodeZigZag(Long.valueOf(2)).intValue()); 207 assertEquals(-2, ProtobufParser.decodeZigZag(Long.valueOf(3)).intValue()); 208 208 } 209 209 }
Note:
See TracChangeset
for help on using the changeset viewer.