Skip to content

Commit

Permalink
Merge enigma test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Jan 8, 2025
1 parent b19ca68 commit d5db816
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,14 @@ void testEnigma() {
assertInheritMap(mappings);
mappings = assertDoesNotThrow(() -> format.parse(mappingsTextWithTrailingNewline));
assertInheritMap(mappings);
}

@Test
void testEnigmaWithoutEntries() {
// The mapped names are optional, so we should be able to parse a sample with no
// actual target names, and get an empty result.
String mappingsText = """
String mappingsTextWithNoDestinationNames = """
CLASS test/Greetings
\tFIELD oldField Ljava/lang/String;
\tMETHOD say ()V""";
MappingFileFormat format = new EnigmaMappings();
IntermediateMappings mappings = assertDoesNotThrow(() -> format.parse(mappingsText));
mappings = assertDoesNotThrow(() -> format.parse(mappingsTextWithNoDestinationNames));
assertTrue(mappings.getClasses().isEmpty());
assertTrue(mappings.getFields().isEmpty());
assertTrue(mappings.getMethods().isEmpty());
Expand Down

0 comments on commit d5db816

Please sign in to comment.