[Git][java-team/procyon][master] 3 commits: Disable failing tests for Java 21 (Closes: #1057532)

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Thu Oct 3 11:03:31 BST 2024



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / procyon


Commits:
635bb940 by Vladimir Petko at 2024-10-03T11:57:00+02:00
Disable failing tests for Java 21 (Closes: #1057532)

- - - - -
b5d63c18 by Emmanuel Bourg at 2024-10-03T11:57:35+02:00
Standards-Version updated to 4.7.0

- - - - -
c5b8aa18 by Emmanuel Bourg at 2024-10-03T11:58:02+02:00
Upload to unstable

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/03-java21-disable-failing-tests.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+procyon (0.6.0-3) unstable; urgency=medium
+
+  [ Vladimir Petko ]
+  * d/p/03-java21-disable-failing-tests.patch: disable tests failing
+    in Java 21 (Closes: #1057532).
+
+  [ Emmanuel Bourg ]
+  * Standards-Version updated to 4.7.0
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Thu, 03 Oct 2024 11:57:53 +0200
+
 procyon (0.6.0-2) unstable; urgency=medium
 
   * Prevent untrusted code execution from the command line (Closes: #1068463)


=====================================
debian/control
=====================================
@@ -11,7 +11,7 @@ Build-Depends:
  junit4,
  libjcommander-java (>= 1.71-1~),
  maven-repo-helper
-Standards-Version: 4.6.0.1
+Standards-Version: 4.7.0
 Vcs-Git: https://salsa.debian.org/java-team/procyon.git
 Vcs-Browser: https://salsa.debian.org/java-team/procyon
 Homepage: https://github.com/mstrobel/procyon


=====================================
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 <vladimir.petko at canonical.com>
+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/8acb21988739056fe48b6cd126952c6268c8f609...c5b8aa18f0bcb7e3c496f493f2744f828520554a

-- 
View it on GitLab: https://salsa.debian.org/java-team/procyon/-/compare/8acb21988739056fe48b6cd126952c6268c8f609...c5b8aa18f0bcb7e3c496f493f2744f828520554a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20241003/bbe0172f/attachment.htm>


More information about the pkg-java-commits mailing list