Emmanuel Bourg pushed to branch master at Debian Java Maintainers / procyon
Commits: cfd8c547 by Vladimir Petko at 2024-02-02T21:53:09+13:00 disable failing tests for Java 21 - - - - - 5e315d5d by Vladimir Petko at 2024-02-02T22:43:42+13:00 changelog - - - - - 8acb2198 by Vladimir Petko at 2024-05-08T01:50:45+00:00 Merge branch 'master' into 'disable_failing_tests' # Conflicts: # debian/changelog - - - - - 3 changed files: - debian/changelog - + debian/patches/03-java21-disable-failing-tests.patch - debian/patches/series Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,11 @@ + +procyon (0.6.0-3) UNRELEASED; urgency=medium + + * d/p/03-java21-disable-failing-tests.patch: disable tests failing + in Java 21 (Closes: #1057532). + + -- Vladimir Petko <[email protected]> Fri, 02 Feb 2024 21:57:43 +1300 + procyon (0.6.0-2) unstable; urgency=medium * Prevent untrusted code execution from the command line (Closes: #1068463) ===================================== debian/patches/03-java21-disable-failing-tests.patch ===================================== @@ -0,0 +1,95 @@ +Description: disable tests failing with Java 21 + - SwitchTests.testEnumSwitch - enum switch was decompiled as an ordinal switch. + - ThirdPartyTests.testUnboxToNumber - decompiled code contains Constable, + not Number. + - ThirdPartyTests.testLiteralAssignments - test specifies float numbers with + excess precision, Java truncates those since 19. + - ThirdPartyTests.testOptimizedVariables, testSwitchKrakatau, + testWhileLoopsKrakatau - decompiled variable does not match ('b' vs 'x') +Author: Vladimir Petko <[email protected]> +Bug: https://github.com/mstrobel/procyon/issues/71 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057532 +Last-Update: 2024-02-02 +--- a/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/DecompilerTest.java ++++ b/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/DecompilerTest.java +@@ -157,4 +157,14 @@ + + return CompilerTarget.DEFAULT; + } ++ ++ protected static boolean specificationVersionLessThan21() { ++ try { ++ return Integer.parseInt(System.getProperty("java.specification.version")) < 21 ; ++ } ++ catch (NumberFormatException e) { ++ // will fail for 1.8 earlier ++ } ++ return true; ++ } + } +--- a/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/SwitchTests.java ++++ b/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/SwitchTests.java +@@ -13,6 +13,7 @@ + + package com.strobel.decompiler; + ++import org.junit.Assume; + import org.junit.Test; + + public class SwitchTests extends DecompilerTest { +@@ -254,6 +255,8 @@ + + @Test + public void testEnumSwitch() { ++ Assume.assumeTrue("Java 21: enum switch was decompiled as an ordinal switch", ++ specificationVersionLessThan21()); + verifyOutput( + SwitchTests$D.class, + createSettings(OPTION_EXCLUDE_NESTED | OPTION_FLATTEN_SWITCH_BLOCKS), +--- a/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/ThirdPartyTests.java ++++ b/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/ThirdPartyTests.java +@@ -20,6 +20,8 @@ + + @Test + public void testOptimizedVariables() throws Throwable { ++ Assume.assumeTrue("Java 21: decompiled variable does not match ('b' vs 'x')", ++ specificationVersionLessThan21()); + assumePreJdk9(); + verifyOutput( + Class.forName("SootOptimizationTest"), +@@ -97,6 +99,8 @@ + + @Test + public void testSwitchKrakatau() throws Throwable { ++ Assume.assumeTrue("Java 21: decompiled variable does not match ('b' vs 'x')", ++ specificationVersionLessThan21()); + assumePreJdk9(); + verifyOutput( + Class.forName("Switch"), +@@ -147,6 +151,8 @@ + + @Test + public void testWhileLoopsKrakatau() throws Throwable { ++ Assume.assumeTrue("Java 21: decompiled variable does not match ('b' vs 'x')", ++ specificationVersionLessThan21()); + assumePreJdk9(); + verifyOutput( + Class.forName("WhileLoops"), +@@ -283,6 +289,8 @@ + + @Test + public void testUnboxToNumber() throws Throwable { ++ Assume.assumeTrue("Java 21: decompiled code contains Constable, not Number", ++ specificationVersionLessThan21()); + assumePreJdk9(); + verifyOutput( + Class.forName("UnboxToNumber"), +@@ -307,6 +315,8 @@ + + @Test + public void testLiteralAssignments() { ++ Assume.assumeTrue("Java 21 truncates floats specified with excess precision", ++ specificationVersionLessThan21()); + verifyOutput( + "LiteralAssignments", + defaultSettings(), ===================================== debian/patches/series ===================================== @@ -1 +1,2 @@ 02-cli-program-name.patch +03-java21-disable-failing-tests.patch View it on GitLab: https://salsa.debian.org/java-team/procyon/-/compare/5d917ba977596412dd3b207a9195c78390cadc7b...8acb21988739056fe48b6cd126952c6268c8f609 -- View it on GitLab: https://salsa.debian.org/java-team/procyon/-/compare/5d917ba977596412dd3b207a9195c78390cadc7b...8acb21988739056fe48b6cd126952c6268c8f609 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ pkg-java-commits mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

