Skip to content

Commit f72801a

Browse files
authored
Merge pull request #8 from XDagger/develop
sync code
2 parents d25a396 + 73779b9 commit f72801a

File tree

6 files changed

+23
-19
lines changed

6 files changed

+23
-19
lines changed

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<maven.compiler.source>17</maven.compiler.source>
3030
<maven.compiler.target>17</maven.compiler.target>
3131
<jna.version>5.13.0</jna.version>
32-
<lombok.version>1.18.26</lombok.version>
33-
<junit.version>4.13.2</junit.version>
34-
<jmh.version>1.36</jmh.version>
32+
<lombok.version>1.18.28</lombok.version>
33+
<junit.version>5.10.0</junit.version>
34+
<jmh.version>1.37</jmh.version>
3535
</properties>
3636

3737
<organization>
@@ -212,8 +212,8 @@
212212
</dependency>
213213

214214
<dependency>
215-
<groupId>junit</groupId>
216-
<artifactId>junit</artifactId>
215+
<groupId>org.junit.jupiter</groupId>
216+
<artifactId>junit-jupiter</artifactId>
217217
<version>${junit.version}</version>
218218
<scope>test</scope>
219219
</dependency>

src/test/java/io/xdag/crypto/randomx/RandomXJNATest.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@
2424
package io.xdag.crypto.randomx;
2525

2626
import static io.xdag.crypto.randomx.RandomXJNA.INSTANCE;
27-
import static org.junit.Assert.assertEquals;
28-
import static org.junit.Assert.assertNotEquals;
29-
import static org.junit.Assert.assertNotNull;
27+
import static org.junit.jupiter.api.Assertions.assertEquals;
28+
import static org.junit.jupiter.api.Assertions.assertNotEquals;
29+
import static org.junit.jupiter.api.Assertions.assertNotNull;
3030

3131
import com.sun.jna.Memory;
3232
import com.sun.jna.NativeLong;
3333
import com.sun.jna.Pointer;
3434
import com.sun.jna.ptr.PointerByReference;
3535
import java.util.HexFormat;
36-
import org.junit.Test;
36+
37+
import org.junit.jupiter.api.Test;
3738

3839
public class RandomXJNATest {
3940

@@ -47,15 +48,15 @@ public void testRandomx_get_flags() {
4748
public void testRandomx_alloc_cache() {
4849
int flags = RandomXFlag.JIT.getValue();
4950
PointerByReference newCache = INSTANCE.randomx_alloc_cache(flags);
50-
assertNotNull("randomx alloc cache ", newCache);
51+
assertNotNull(newCache,"randomx alloc cache ");
5152
}
5253

5354
@Test
5455
public void testRandomx_init_cache() {
5556
int length = 32;
5657
int flags = RandomXFlag.JIT.getValue();
5758
PointerByReference newCache = INSTANCE.randomx_alloc_cache(flags);
58-
assertNotNull("randomx alloc cache ", newCache);
59+
assertNotNull(newCache, "randomx alloc cache ");
5960

6061
byte[] buffer = new byte[length];
6162
Memory memory = new Memory(length);
@@ -68,7 +69,7 @@ public void testRandomx_release_cache() {
6869
int length = 32;
6970
int flags = RandomXFlag.JIT.getValue();
7071
PointerByReference newCache = INSTANCE.randomx_alloc_cache(flags);
71-
assertNotNull("randomx alloc cache ", newCache);
72+
assertNotNull(newCache, "randomx alloc cache ");
7273

7374
byte[] buffer = new byte[length];
7475
Memory memory = new Memory(length);

src/test/java/io/xdag/crypto/randomx/RandomXUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
*/
2424
package io.xdag.crypto.randomx;
2525

26-
import static org.junit.Assert.assertNotNull;
26+
import static org.junit.jupiter.api.Assertions.assertNotNull;
2727

28-
import org.junit.Test;
28+
import org.junit.jupiter.api.Test;
2929

3030
public class RandomXUtilsTest {
3131

src/test/java/io/xdag/crypto/randomx/RandomXVMTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@
2424
package io.xdag.crypto.randomx;
2525

2626
import static io.xdag.crypto.randomx.RandomXJNA.INSTANCE;
27-
import static org.junit.Assert.assertEquals;
27+
import static org.junit.jupiter.api.Assertions.assertEquals;
2828

2929
import com.sun.jna.Memory;
3030
import com.sun.jna.NativeLong;
3131
import com.sun.jna.ptr.PointerByReference;
3232
import java.util.HexFormat;
33-
import org.junit.Test;
33+
34+
import org.junit.jupiter.api.Test;
3435

3536
public class RandomXVMTest {
3637

src/test/java/io/xdag/crypto/randomx/RandomXWrapperTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
*/
2424
package io.xdag.crypto.randomx;
2525

26-
import static org.junit.Assert.assertEquals;
26+
27+
import static org.junit.jupiter.api.Assertions.assertEquals;
2728

2829
import java.nio.charset.StandardCharsets;
2930
import java.util.HexFormat;
3031
import java.util.List;
31-
import org.junit.Test;
32+
33+
import org.junit.jupiter.api.Test;
3234

3335
public class RandomXWrapperTest {
3436

0 commit comments

Comments
 (0)