Graham
b37e4d0d0b
Use alternatives for most methods deprecated in Kotlin 1.5
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
359891c01e
Convert all test objects to classes
...
This is required for IDEA to display the run test icon in the gutter.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
30828308b2
Replace assertThrows with assertFailsWith
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
f143eef142
Move Kotlin files from src/{main,test}/java to src/{main,test}/kotlin
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
ce5b76ef0f
Rename dev.openrs2 package to org.openrs2
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
192d5b9e8d
Resolve inspections
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
cec68723a4
Add Cp1252Charset contains test
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2525501901
Add ModifiedUtf8Charset
...
Will be used by the packclass implementation. Like Cp1252Charset, the
JDK isn't guaranteed to provide an implementation of this charset.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
7ab3b3d335
Add method for calculating the K&R hash code of a CP-1252-encoded string
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
be7cc9ac8a
Add Cp1252Charset
...
Slightly different to the standard implementation, as like the client it
considers NUL to be an unmappable character. (Furthermore, the standard
implementation isn't in StandardCharsets.)
It also provides fast methods for encoding/decoding a single byte/char
at a time.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
eef6d31753
Replace org.junit.jupiter.api.Test with kotlin.test.Test
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8685d2b2dc
Remove unused DeterministicJarOutputStream methods
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
9a1c0e9caf
Add DeterministicJarOutputStreamTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
958fbc03ba
Add IterableUtilsTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
972d3cebc1
Add ForestDisjointSetTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
54aa9b738c
Add testFlush() to SkipOutputStreamTest
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
fced5610a5
Add SkipOutputStreamTest
4 years ago
Graham
465078256f
Rename common module to util again
...
As I'm splitting it up into smaller modules (e.g. compress and crypto) I
think util is a more appropriate name for the remainder.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
e05653cdcc
Rename util to common
4 years ago
Graham
72db700534
Remove capitalize() method
...
Kotlin already has a capitalize() method - we don't need to define our
own.
4 years ago
Graham
db971f6b2b
Convert indefiniteArticle() to an extension method
4 years ago
Graham
09141e451a
Convert StringUtilsTest to Kotlin
4 years ago
Graham
1333cc31e6
Format StringUtilsTest
5 years ago
Graham
ef9e61de33
Add StringUtilsTest
5 years ago