summaryrefslogtreecommitdiff
path: root/dev-java/zxing-javase/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-21 01:09:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-21 01:09:27 +0100
commitd1849ceeb9c09150c11cc0d112883cfba503af27 (patch)
treeac029edd2ec6b691d3ef95fbc731a1b1325d9b82 /dev-java/zxing-javase/files
parent6b89cba67f554b60d139fd07623aef5cc724ec91 (diff)
gentoo auto-resync : 21:07:2023 - 01:09:27
Diffstat (limited to 'dev-java/zxing-javase/files')
-rw-r--r--dev-java/zxing-javase/files/3.5.1-test-available-formats.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/dev-java/zxing-javase/files/3.5.1-test-available-formats.patch b/dev-java/zxing-javase/files/3.5.1-test-available-formats.patch
new file mode 100644
index 000000000000..62e154f0dad4
--- /dev/null
+++ b/dev-java/zxing-javase/files/3.5.1-test-available-formats.patch
@@ -0,0 +1,31 @@
+https://github.com/zxing/zxing/pull/1668
+https://bugs.gentoo.org/910497
+--- a/src/test/java/com/google/zxing/client/j2se/MatrixToImageWriterTestCase.java
++++ b/src/test/java/com/google/zxing/client/j2se/MatrixToImageWriterTestCase.java
+@@ -17,7 +17,9 @@
+ package com.google.zxing.client.j2se;
+
+ import com.google.zxing.common.BitMatrix;
++import static org.hamcrest.CoreMatchers.hasItem;
+ import org.junit.Assert;
++import static org.junit.Assume.assumeThat;
+ import org.junit.Test;
+
+ import javax.imageio.ImageIO;
+@@ -25,6 +27,7 @@
+ import java.io.IOException;
+ import java.nio.file.Files;
+ import java.nio.file.Path;
++import java.util.Arrays;
+
+ /**
+ * Tests {@link MatrixToImageWriter}.
+@@ -52,6 +55,8 @@ private static void doTest(MatrixToImageConfig config) throws IOException {
+ }
+
+ private static void doTestFormat(String format, MatrixToImageConfig config) throws IOException {
++ assumeThat(Arrays.asList(ImageIO.getWriterFormatNames()), hasItem(format));
++
+ int width = 2;
+ int height = 3;
+ BitMatrix matrix = new BitMatrix(width, height);