Skip to content

Commit

Permalink
Rename JDK14 tests to JDK17 (#953)
Browse files Browse the repository at this point in the history
* Rename test folder from jdk14 to jdk17

* Rename test data to TestDataJava17
  • Loading branch information
theigl committed Apr 15, 2023
1 parent 1e29ea7 commit b2610a5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Expand Up @@ -434,11 +434,11 @@
</pluginManagement>
</build>
</profile>
<!-- Include any tests that require JDK14+ -->
<!-- Include any tests that require JDK17+ -->
<profile>
<id>jdk14ge</id>
<id>jdk17ge</id>
<activation>
<jdk>[14,</jdk>
<jdk>[17,</jdk>
</activation>
<build>
<plugins>
Expand Down Expand Up @@ -468,7 +468,7 @@
<sources>
<source>test-kotlin</source>
<source>test-jdk11</source>
<source>test-jdk14</source>
<source>test-jdk17</source>
</sources>
</configuration>
</execution>
Expand All @@ -478,7 +478,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- Enable Java 14+ for all sources so that Intellij picks the right language level -->
<!-- Enable Java 17+ for all sources so that Intellij picks the right language level -->
<source>${java.vm.specification.version}</source>
<target>${java.vm.specification.version}</target>
<compilerArgs>
Expand Down
Expand Up @@ -26,7 +26,7 @@
* @author Julia Boes <julia.boes@oracle.com>
* @author Chris Hegarty <chris.hegarty@oracle.com>
*/
public class TestDataJava14 extends SerializationCompatTestData.TestData {
public class TestDataJava17 extends SerializationCompatTestData.TestData {
public record Rec (byte b, short s, int i, long l, float f, double d, boolean bool, char c, String str, Integer[] n) {
// Overriden because of https://stackoverflow.com/questions/61261226/java-14-records-and-arrays
public boolean equals(Object o) {
Expand All @@ -40,7 +40,7 @@ public int hashCode() {

private Rec rec;

public TestDataJava14() {
public TestDataJava17() {
rec = new Rec("b".getBytes()[0], (short)1, 2, 3L, 4.0f, 5.0d, true, 'c', "foo", new Integer[]{1,2,3});
}
}
Expand Up @@ -91,7 +91,7 @@ class SerializationCompatTest extends KryoTestCase {
TEST_DATAS.add(new TestDataDescription<>(new TestData(), 1940, 1958));
if (JAVA_VERSION >= 8) TEST_DATAS.add(new TestDataDescription<>(new TestDataJava8(), 2098, 2116));
if (JAVA_VERSION >= 11) TEST_DATAS.add(new TestDataDescription<>(createTestData(11), 2182, 2210));
if (JAVA_VERSION >= 14) TEST_DATAS.add(new TestDataDescription<>(createTestData(14), 1948, 1966));
if (JAVA_VERSION >= 17) TEST_DATAS.add(new TestDataDescription<>(createTestData(17), 1948, 1966));
};

private static TestData createTestData(int version) {
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit b2610a5

Please sign in to comment.