mirror of
https://github.com/zxing/zxing.git
synced 2025-02-21 02:55:27 -08:00
javase/test/matrix: check format support (#1668)
This commit is contained in:
parent
6d1543b3dd
commit
4a59188a2e
|
@ -17,7 +17,9 @@
|
|||
package com.google.zxing.client.j2se;
|
||||
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import org.hamcrest.CoreMatchers;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Assume;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
@ -25,6 +27,7 @@ import java.awt.image.BufferedImage;
|
|||
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 @@ public final class MatrixToImageWriterTestCase extends Assert {
|
|||
}
|
||||
|
||||
private static void doTestFormat(String format, MatrixToImageConfig config) throws IOException {
|
||||
Assume.assumeThat(Arrays.asList(ImageIO.getWriterFormatNames()), CoreMatchers.hasItem(format));
|
||||
|
||||
int width = 2;
|
||||
int height = 3;
|
||||
BitMatrix matrix = new BitMatrix(width, height);
|
||||
|
|
Loading…
Reference in a new issue