diff options
| author | 2019-12-05 15:45:36 +0200 | |
|---|---|---|
| committer | 2019-12-05 13:45:36 +0000 | |
| commit | 7ceb4a7668d4e13ed0f4e621f52c5fe974fd32a1 (patch) | |
| tree | 6c3b5cbccc273fdd3dd721eb7f3ef68a18a69a6a /src/test/java | |
| parent | Allow attaching class, method, field, and parameter javadocs (#185) (diff) | |
| download | enigma-7ceb4a7668d4e13ed0f4e621f52c5fe974fd32a1.tar.gz enigma-7ceb4a7668d4e13ed0f4e621f52c5fe974fd32a1.tar.xz enigma-7ceb4a7668d4e13ed0f4e621f52c5fe974fd32a1.zip | |
Fix comments (#187)
* fix comments
* indent
Diffstat (limited to '')
| -rw-r--r-- | src/test/java/cuchaz/enigma/mapping/TestComments.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/java/cuchaz/enigma/mapping/TestComments.java b/src/test/java/cuchaz/enigma/mapping/TestComments.java new file mode 100644 index 00000000..b3a60056 --- /dev/null +++ b/src/test/java/cuchaz/enigma/mapping/TestComments.java | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | package cuchaz.enigma.mapping; | ||
| 2 | |||
| 3 | import java.io.IOException; | ||
| 4 | import java.net.URISyntaxException; | ||
| 5 | import java.nio.file.Path; | ||
| 6 | import java.nio.file.Paths; | ||
| 7 | |||
| 8 | import cuchaz.enigma.ProgressListener; | ||
| 9 | import cuchaz.enigma.throwables.MappingParseException; | ||
| 10 | import cuchaz.enigma.translation.mapping.EntryMapping; | ||
| 11 | import cuchaz.enigma.translation.mapping.MappingFileNameFormat; | ||
| 12 | import cuchaz.enigma.translation.mapping.MappingSaveParameters; | ||
| 13 | import cuchaz.enigma.translation.mapping.serde.EnigmaMappingsReader; | ||
| 14 | import cuchaz.enigma.translation.mapping.serde.TinyV2Writer; | ||
| 15 | import cuchaz.enigma.translation.mapping.tree.EntryTree; | ||
| 16 | import org.junit.Test; | ||
| 17 | |||
| 18 | public class TestComments { | ||
| 19 | private static Path DIRECTORY; | ||
| 20 | |||
| 21 | static { | ||
| 22 | try { | ||
| 23 | DIRECTORY = Paths.get(TestTinyV2InnerClasses.class.getResource("/comments/").toURI()); | ||
| 24 | } catch (URISyntaxException e) { | ||
| 25 | throw new RuntimeException(e); | ||
| 26 | } | ||
| 27 | } | ||
| 28 | |||
| 29 | @Test | ||
| 30 | public void testParseAndWrite() throws IOException, MappingParseException { | ||
| 31 | ProgressListener progressListener = ProgressListener.none(); | ||
| 32 | MappingSaveParameters params = new MappingSaveParameters(MappingFileNameFormat.BY_DEOBF); | ||
| 33 | EntryTree<EntryMapping> mappings = EnigmaMappingsReader.DIRECTORY.read( | ||
| 34 | DIRECTORY, progressListener, params); | ||
| 35 | |||
| 36 | new TinyV2Writer("intermediary", "named") | ||
| 37 | .write(mappings, DIRECTORY.resolve("convertedtiny.tiny"), progressListener, params); | ||
| 38 | } | ||
| 39 | |||
| 40 | } \ No newline at end of file | ||