File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
src/test/java/org/jd/core/v1 Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,26 @@ public class MiscTest extends AbstractJdTest {
123
123
// // Recompile decompiled source code and check errors
124
124
// assertTrue(CompilerUtil.compile("1.8", new InMemoryJavaSourceFileObject(internalClassName, source)));
125
125
// }
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
+
127
146
@ Test
128
147
public void testFileFilterUtils () throws Exception {
129
148
abstract class FileFilterUtils {
You can’t perform that action at this time.
0 commit comments