diff --git a/compressedint/src/test/java/de/bmarwell/zchunk/compressedint/CompressedIntTest.java b/compressedint/src/test/java/io/github/zchunk/compressedint/CompressedIntTest.java similarity index 87% rename from compressedint/src/test/java/de/bmarwell/zchunk/compressedint/CompressedIntTest.java rename to compressedint/src/test/java/io/github/zchunk/compressedint/CompressedIntTest.java index 2790cd2..b3c99f2 100644 --- a/compressedint/src/test/java/de/bmarwell/zchunk/compressedint/CompressedIntTest.java +++ b/compressedint/src/test/java/io/github/zchunk/compressedint/CompressedIntTest.java @@ -59,6 +59,7 @@ public void testToCompressedInt_ulong_max() { final CompressedInt bytes = CompressedIntFactory.valueOf(unsignedLongValue); final String binaryString = byteArrayToBinaryString(bytes.getCompressedBytes()); + System.out.println("" + new BigInteger(1, bytes.getCompressedBytes()).toString(16)); Assertions.assertEquals("1111111011111110111111101111111011111110111111101111111011111110111111110000001", binaryString); } @@ -143,6 +144,23 @@ public void testToUnsignedInt() { Assertions.assertEquals(394L, unsignedLong); } + @Test + public void testUnsignedIntMax() { + final BigInteger maxUnsignedInt = new BigInteger("4294967295", 10); + final CompressedInt compressedInt = CompressedIntFactory.valueOf(maxUnsignedInt.longValueExact()); + + Assertions.assertEquals("7f7f7f7f8f", new BigInteger(1, compressedInt.getCompressedBytes()).toString(16)); + } + + @Test + public void testLongValue() { + final long maxUnsingnedIntAsLong = 4_294_967_295L; + final CompressedInt compressedInt = CompressedIntFactory.valueOf(maxUnsingnedIntAsLong); + + Assertions.assertEquals("7f7f7f7f8f", new BigInteger(1, compressedInt.getCompressedBytes()).toString(16)); + + } + @Test public void testExceptionOnBigLongToInt() { final CompressedInt compressedInt = CompressedIntFactory.valueOf(0xffffffff00ffffL); @@ -162,6 +180,7 @@ public void testExceptionOnBigLongToUnsignedLong() { final CompressedInt compressedInt = CompressedIntFactory.valueOf(-1L); Assertions.assertEquals(-1L, compressedInt.getUnsignedLongValue()); + Assertions.assertEquals("7f7f7f7f7f7f7f7f7f81", new BigInteger(1, compressedInt.getCompressedBytes()).toString(16)); } @Test diff --git a/compression/compression-api/src/test/java/de/bmarwell/zchunk/compression/api/CompressionAlgorithmFactoryTest.java b/compression/compression-api/src/test/java/io/github/zchunk/compression/api/CompressionAlgorithmFactoryTest.java similarity index 100% rename from compression/compression-api/src/test/java/de/bmarwell/zchunk/compression/api/CompressionAlgorithmFactoryTest.java rename to compression/compression-api/src/test/java/io/github/zchunk/compression/api/CompressionAlgorithmFactoryTest.java diff --git a/fileformat/src/test/java/de/bmarwell/zchunk/fileformat/ZChunkFileTest.java b/fileformat/src/test/java/io/github/zchunk/fileformat/ZChunkFileTest.java similarity index 100% rename from fileformat/src/test/java/de/bmarwell/zchunk/fileformat/ZChunkFileTest.java rename to fileformat/src/test/java/io/github/zchunk/fileformat/ZChunkFileTest.java diff --git a/fileformat/src/test/java/de/bmarwell/zchunk/fileformat/ZChunkHeaderFactoryTest.java b/fileformat/src/test/java/io/github/zchunk/fileformat/ZChunkHeaderFactoryTest.java similarity index 100% rename from fileformat/src/test/java/de/bmarwell/zchunk/fileformat/ZChunkHeaderFactoryTest.java rename to fileformat/src/test/java/io/github/zchunk/fileformat/ZChunkHeaderFactoryTest.java diff --git a/fileformat/src/test/java/de/bmarwell/zchunk/fileformat/ZChunkTest.java b/fileformat/src/test/java/io/github/zchunk/fileformat/ZChunkTest.java similarity index 100% rename from fileformat/src/test/java/de/bmarwell/zchunk/fileformat/ZChunkTest.java rename to fileformat/src/test/java/io/github/zchunk/fileformat/ZChunkTest.java diff --git a/fileformat/src/test/java/de/bmarwell/zchunk/fileformat/util/ByteUtilTest.java b/fileformat/src/test/java/io/github/zchunk/fileformat/util/ByteUtilTest.java similarity index 100% rename from fileformat/src/test/java/de/bmarwell/zchunk/fileformat/util/ByteUtilTest.java rename to fileformat/src/test/java/io/github/zchunk/fileformat/util/ByteUtilTest.java