From 4abc97c88e1fa70b7a8112b0e270900506d16a36 Mon Sep 17 00:00:00 2001 From: NebelNidas Date: Fri, 19 Apr 2024 19:38:30 +0200 Subject: [PATCH] Fix crash, verify JAM writer against `lorenz-jam` --- build.gradle | 1 + src/test/java/net/fabricmc/mappingio/TestHelper.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/build.gradle b/build.gradle index 4b523d06..7fec4885 100644 --- a/build.gradle +++ b/build.gradle @@ -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}" diff --git a/src/test/java/net/fabricmc/mappingio/TestHelper.java b/src/test/java/net/fabricmc/mappingio/TestHelper.java index dffefea1..70e06f0c 100644 --- a/src/test/java/net/fabricmc/mappingio/TestHelper.java +++ b/src/test/java/net/fabricmc/mappingio/TestHelper.java @@ -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); @@ -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);