Skip to content

Commit

Permalink
Fix crash, verify JAM writer against lorenz-jam
Browse files Browse the repository at this point in the history
  • Loading branch information
NebelNidas committed Apr 19, 2024
1 parent 237c4e3 commit 4abc97c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ allprojects {
testImplementation "net.neoforged:srgutils:${srgutils_version}"
testImplementation "org.cadixdev:lorenz:${lorenz_version}"
testImplementation "org.cadixdev:lorenz-io-enigma:${lorenz_version}"
testImplementation "org.cadixdev:lorenz-io-jam:${lorenz_version}"
testImplementation "org.junit.jupiter:junit-jupiter:${junit_jupiter_version}"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
testCompileOnly "org.jetbrains:annotations:${project.jetbrains_annotations_version}"
Expand Down
7 changes: 7 additions & 0 deletions src/test/java/net/fabricmc/mappingio/TestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,15 @@ public static org.cadixdev.lorenz.io.MappingFormat toLorenzFormat(MappingFormat
return MappingFormats.TSRG;
case ENIGMA_FILE:
return MappingFormats.byId("enigma");
case JAM_FILE:
return MappingFormats.byId("jam");
case TINY_FILE:
case TINY_2_FILE:
case ENIGMA_DIR:
case TSRG_2_FILE:
case PROGUARD_FILE:
case RECAF_SIMPLE_FILE:
case JOBF_FILE:
return null;
default:
throw new IllegalArgumentException("Unknown format: " + format);
Expand Down Expand Up @@ -119,6 +123,9 @@ public static IMappingFile.Format toSrgUtilsFormat(MappingFormat format) {
return IMappingFile.Format.PG;
case ENIGMA_FILE:
case ENIGMA_DIR:
case JAM_FILE:
case RECAF_SIMPLE_FILE:
case JOBF_FILE:
return null;
default:
throw new IllegalArgumentException("Unknown format: " + format);
Expand Down

0 comments on commit 4abc97c

Please sign in to comment.