Skip to content

Commit

Permalink
Tests main module-info is the one from core
Browse files Browse the repository at this point in the history
  • Loading branch information
jqno committed Jan 19, 2025
1 parent 96ee49f commit 930e96b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions equalsverifier-release-verify/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<artifact.src.main>${project.basedir}/../equalsverifier-release-main/target</artifact.src.main>
<artifact.src.nodep>${project.basedir}/../equalsverifier-release-nodep/target</artifact.src.nodep>
<artifact.src.core>${project.basedir}/../equalsverifier-core/target</artifact.src.core>
<artifact.dst>${project.basedir}/src/test/resources</artifact.dst>
</properties>

Expand Down Expand Up @@ -76,6 +77,10 @@
<sourceFile>${artifact.src.nodep}/equalsverifier-nodep-${project.version}-sources.jar</sourceFile>
<destinationFile>${artifact.dst}/equalsverifier-nodep-sources.jar</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${artifact.src.core}/equalsverifier-core-${project.version}.jar</sourceFile>
<destinationFile>${artifact.dst}/equalsverifier-core.jar</destinationFile>
</fileSet>
</fileSets>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package nl.jqno.equalsverifier.verify_release.jar;

import static org.assertj.core.api.Assertions.assertThat;

import nl.jqno.equalsverifier.verify_release.jar.helper.JarAsserter;
import nl.jqno.equalsverifier.verify_release.jar.helper.JarReader;
import org.junit.jupiter.api.AfterAll;
Expand Down Expand Up @@ -52,4 +54,13 @@ void versionsOfClassFiles() {
void presenceOfModuleInfoWithDependencies() {
jar.assertModuleInfoWithDependencies();
}

@Test
void moduleInfoIsIdenticalToCore() throws Exception {
try (var coreReader = new JarReader("equalsverifier-core.jar")) {
var coreModuleinfo = coreReader.getContentOf("module-info.class");
var mainModuleinfo = reader.getContentOf("module-info.class");
assertThat(mainModuleinfo).containsExactly(coreModuleinfo);
}
}
}

0 comments on commit 930e96b

Please sign in to comment.