Group test files by test

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent 7179743f5d
commit e7ad4b92ff
  1. 2
      cache/src/test/java/dev/openrs2/cache/Js5CompressionTest.kt
  2. 0
      cache/src/test/resources/dev/openrs2/cache/compression/bzip2-encrypted.dat
  3. 0
      cache/src/test/resources/dev/openrs2/cache/compression/bzip2.dat
  4. 0
      cache/src/test/resources/dev/openrs2/cache/compression/gzip-encrypted.dat
  5. 0
      cache/src/test/resources/dev/openrs2/cache/compression/gzip.dat
  6. 0
      cache/src/test/resources/dev/openrs2/cache/compression/lzma-encrypted.dat
  7. 0
      cache/src/test/resources/dev/openrs2/cache/compression/lzma.dat
  8. 0
      cache/src/test/resources/dev/openrs2/cache/compression/none-encrypted.dat
  9. 0
      cache/src/test/resources/dev/openrs2/cache/compression/none.dat
  10. 3
      crypto/src/test/java/dev/openrs2/crypto/IsaacRandomTest.kt
  11. 3
      crypto/src/test/java/dev/openrs2/crypto/WhirlpoolTest.kt
  12. 0
      crypto/src/test/resources/dev/openrs2/crypto/isaac/noseedvect.txt
  13. 0
      crypto/src/test/resources/dev/openrs2/crypto/isaac/randvect.txt
  14. 0
      crypto/src/test/resources/dev/openrs2/crypto/isaac/seedvect.txt
  15. 0
      crypto/src/test/resources/dev/openrs2/crypto/whirlpool/nessie-one-vectors.txt
  16. 0
      crypto/src/test/resources/dev/openrs2/crypto/whirlpool/nessie-zero-vectors.txt

@ -224,7 +224,7 @@ object Js5CompressionTest {
} }
private fun read(name: String): ByteBuf { private fun read(name: String): ByteBuf {
Js5CompressionTest::class.java.getResourceAsStream(name).use { input -> Js5CompressionTest::class.java.getResourceAsStream("compression/$name").use { input ->
return Unpooled.wrappedBuffer(input.readAllBytes()) return Unpooled.wrappedBuffer(input.readAllBytes())
} }
} }

@ -61,8 +61,7 @@ object IsaacRandomTest {
} }
private fun readVector(file: String): IntArray { private fun readVector(file: String): IntArray {
val path = "/dev/openrs2/crypto/$file" val input = IsaacRandomTest::class.java.getResourceAsStream("isaac/$file")
val input = IsaacRandomTest::class.java.getResourceAsStream(path)
return BufferedReader(InputStreamReader(input)).useLines { lines -> return BufferedReader(InputStreamReader(input)).useLines { lines ->
val elements = mutableListOf<Int>() val elements = mutableListOf<Int>()

@ -63,8 +63,7 @@ object WhirlpoolTest {
private val NESSIE_ONE_VECTORS = readVectors("nessie-one-vectors.txt") private val NESSIE_ONE_VECTORS = readVectors("nessie-one-vectors.txt")
private fun readVectors(file: String): List<ByteArray> { private fun readVectors(file: String): List<ByteArray> {
val path = "/dev/openrs2/crypto/$file" val input = WhirlpoolTest::class.java.getResourceAsStream("whirlpool/$file")
val input = WhirlpoolTest::class.java.getResourceAsStream(path)
return input.bufferedReader().use { reader -> return input.bufferedReader().use { reader ->
reader.lines() reader.lines()
.map(ByteBufUtil::decodeHexDump) .map(ByteBufUtil::decodeHexDump)

Loading…
Cancel
Save