Skip to content

Commit

Permalink
feat(objectionary#226): add puzzle to refactor SelectiveDecompilerTest
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed May 16, 2024
1 parent 404da55 commit be01628
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,20 @@
/**
* Test cases for {@link org.eolang.opeo.SelectiveDecompiler}.
* @since 0.1
* @todo #226:90min Refactor SelectiveDecompilerTest.
* This test has a lot of string literals that are duplicated.
* Moreover, it has a {@link SelectiveDecompilerTest#supported} field that should be removed.
* See the javadoc for 'supported' field.
* Also we have some sort of duplication between method initializations.
*/
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
final class SelectiveDecompilerTest {

/**
* Supported opcodes.
* Here we intentionally expand the list of supported opcodes to test the decompiler.
* Bar.xmir contains the IFLE instruction which is not supported by the decompiler yet.
*/
private final String[] supported =
Stream.concat(
Arrays.stream(new RouterHandler(false).supportedOpcodes()),
Expand Down Expand Up @@ -157,5 +168,4 @@ void doesNotCopyDecompiledFiles(@TempDir final Path temp) throws Exception {
Matchers.arrayWithSize(2)
);
}

}

0 comments on commit be01628

Please sign in to comment.