X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=core%2Ftest%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fqrcode%2FQRCodeWriterTestCase.java;h=1b884f9c5582868b4c3c693bdad3cc76662c4257;hp=da9b17d73d2ffb9eb4cdece7995a81b98abfc503;hb=e5d03a79a458340b69a57914a352f0a8841cdf69;hpb=a932cce57fabafd18a5db770f2c87afbd72e31b9 diff --git a/core/test/src/com/google/zxing/qrcode/QRCodeWriterTestCase.java b/core/test/src/com/google/zxing/qrcode/QRCodeWriterTestCase.java index da9b17d7..1b884f9c 100644 --- a/core/test/src/com/google/zxing/qrcode/QRCodeWriterTestCase.java +++ b/core/test/src/com/google/zxing/qrcode/QRCodeWriterTestCase.java @@ -21,20 +21,20 @@ import com.google.zxing.EncodeHintType; import com.google.zxing.WriterException; import com.google.zxing.common.BitMatrix; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; -import junit.framework.TestCase; +import org.junit.Assert; +import org.junit.Test; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; -import java.util.Arrays; import java.util.Hashtable; /** * @author satorux@google.com (Satoru Takabayashi) - creator * @author dswitkin@google.com (Daniel Switkin) - ported and expanded from C++ */ -public final class QRCodeWriterTestCase extends TestCase { +public final class QRCodeWriterTestCase extends Assert { private static final String BASE_IMAGE_PATH = "test/data/golden/qrcode/"; @@ -74,6 +74,7 @@ public final class QRCodeWriterTestCase extends TestCase { return matrix; } + @Test public void testQRCodeWriter() throws WriterException { // The QR should be multiplied up to fit, with extra padding if necessary int bigEnough = 256; @@ -123,7 +124,8 @@ public final class QRCodeWriterTestCase extends TestCase { // Golden images are generated with "qrcode_sample.cc". The images are checked with both eye balls // and cell phones. We expect pixel-perfect results, because the error correction level is known, - // and the pixel dimensions matches exactly. + // and the pixel dimensions matches exactly. + @Test public void testRegressionTest() throws WriterException { compareToGoldenFile("http://www.google.com/", ErrorCorrectionLevel.M, 99, "renderer-test-01.png");