File tree Expand file tree Collapse file tree
src/test/java/org/jd/core/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,26 @@ public class MiscTest extends AbstractJdTest {
123123// // Recompile decompiled source code and check errors
124124// assertTrue(CompilerUtil.compile("1.8", new InMemoryJavaSourceFileObject(internalClassName, source)));
125125// }
126-
126+
127+ @ Test
128+ public void testFREM () throws Exception {
129+ class FREM {
130+ @ SuppressWarnings ("unused" )
131+ float frem (float a , float b ) {
132+ return a % b ;
133+ }
134+ }
135+ String internalClassName = FREM .class .getName ().replace ('.' , '/' );
136+ String source = decompileSuccess (new ClassPathLoader (), new PlainTextPrinter (), internalClassName );
137+
138+ // Check decompiled source code
139+ assertTrue (source .matches (PatternMaker .make ("float frem(float a, float b) {" )));
140+ assertTrue (source .matches (PatternMaker .make ("return a % b;" )));
141+
142+ // Recompile decompiled source code and check errors
143+ assertTrue (CompilerUtil .compile ("1.4" , new InMemoryJavaSourceFileObject (internalClassName , source )));
144+ }
145+
127146 @ Test
128147 public void testFileFilterUtils () throws Exception {
129148 abstract class FileFilterUtils {
You can’t perform that action at this time.
0 commit comments