This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-script-interpreter.git
The following commit(s) were added to refs/heads/master by this push:
new dd34625 Parameterize bytecode normalization test
dd34625 is described below
commit dd34625abb0a00398cd7154ee65ce6c33d41deaf
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Thu Nov 19 00:56:27 2026 +0100
Parameterize bytecode normalization test
---
.../scriptinterpreter/GroovyScriptInterpreterTest.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
a/src/test/java/org/apache/maven/shared/scriptinterpreter/GroovyScriptInterpreterTest.java
b/src/test/java/org/apache/maven/shared/scriptinterpreter/GroovyScriptInterpreterTest.java
index 6be0960..3845d0e 100644
---
a/src/test/java/org/apache/maven/shared/scriptinterpreter/GroovyScriptInterpreterTest.java
+++
b/src/test/java/org/apache/maven/shared/scriptinterpreter/GroovyScriptInterpreterTest.java
@@ -34,6 +34,8 @@ import java.util.Map;
import org.apache.commons.io.FilenameUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotSame;
@@ -211,11 +213,9 @@ class GroovyScriptInterpreterTest {
return sourceFile;
}
- @Test
- void normalizeTargetBytecodeMapsOldJdksToDotForm() {
- assertEquals("1.4",
GroovyScriptInterpreter.normalizeTargetBytecode("4"));
- assertEquals("1.8",
GroovyScriptInterpreter.normalizeTargetBytecode("8"));
- assertEquals("9",
GroovyScriptInterpreter.normalizeTargetBytecode("9"));
- assertEquals("17",
GroovyScriptInterpreter.normalizeTargetBytecode("17"));
+ @ParameterizedTest
+ @CsvSource({"4, 1.4", "8, 1.8", "9, 9", "17, 17"})
+ void normalizeTargetBytecodeMapsOldJdksToDotForm(String version, String
expected) {
+ assertEquals(expected,
GroovyScriptInterpreter.normalizeTargetBytecode(version));
}
}