diff --git a/bindings/java/build.gradle b/bindings/java/build.gradle index 56037bd..00165b8 100644 --- a/bindings/java/build.gradle +++ b/bindings/java/build.gradle @@ -7,7 +7,12 @@ repositories { } dependencies { - testImplementation("org.junit.jupiter:junit-jupiter:5.9.1") + + def junitVersion = "5.9.1" + + testImplementation("org.junit.jupiter:junit-jupiter:${junitVersion}") + testImplementation("org.junit.jupiter:junit-jupiter-params:${junitVersion}") + } test { diff --git a/bindings/java/src/test/java/ethereum/ckzg4844/CKZg4844JNITest.java b/bindings/java/src/test/java/ethereum/ckzg4844/CKZg4844JNITest.java index 62f8c0b..4e3ebd8 100644 --- a/bindings/java/src/test/java/ethereum/ckzg4844/CKZg4844JNITest.java +++ b/bindings/java/src/test/java/ethereum/ckzg4844/CKZg4844JNITest.java @@ -11,6 +11,8 @@ import java.util.Random; import java.util.stream.IntStream; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; public class CKZg4844JNITest { @@ -65,13 +67,12 @@ public class CKZg4844JNITest { } @Disabled("Use for manually testing performance.") - @Test - public void testPerformance() { + @ParameterizedTest + @ValueSource(ints = {1, 10, 100, 1000}) + public void testPerformance(final int count) { loadTrustedSetup(); - final int count = 100; - final byte[] blobs = createRandomBlobs(count); final byte[] commitments = getCommitmentsForBlobs(blobs, count);