Changeset 18695 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2023-03-20T21:52:18+01:00 (18 months ago)
Author:
taylor.smock
Message:

Fix #22603: Add PBF reading support

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  
    4343 * @since 17862
    4444 */
    45 class ProtobufTest {
     45public class ProtobufTest {
    4646    /**
    4747     * Convert an int array into a byte array
     
    4949     * @return A byte array that can be used
    5050     */
    51     static byte[] toByteArray(int[] intArray) {
     51    public static byte[] toByteArray(int[] intArray) {
    5252        byte[] byteArray = new byte[intArray.length];
    5353        for (int i = 0; i < intArray.length; i++) {
     
    202202    @Test
    203203    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());
    208208    }
    209209}
Note: See TracChangeset for help on using the changeset viewer.