X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=core%2Ftest%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fqrcode%2Fencoder%2FMaskUtilTestCase.java;h=2a59a467dfd8b148dc36e3bb91d8b4fbf3f45865;hp=183cdb1f10a59ebd557af696cb0063ea2f0114a1;hb=e5d03a79a458340b69a57914a352f0a8841cdf69;hpb=a932cce57fabafd18a5db770f2c87afbd72e31b9 diff --git a/core/test/src/com/google/zxing/qrcode/encoder/MaskUtilTestCase.java b/core/test/src/com/google/zxing/qrcode/encoder/MaskUtilTestCase.java index 183cdb1f..2a59a467 100644 --- a/core/test/src/com/google/zxing/qrcode/encoder/MaskUtilTestCase.java +++ b/core/test/src/com/google/zxing/qrcode/encoder/MaskUtilTestCase.java @@ -16,14 +16,17 @@ package com.google.zxing.qrcode.encoder; -import junit.framework.TestCase; +import org.junit.Assert; +import org.junit.Test; /** * @author satorux@google.com (Satoru Takabayashi) - creator * @author mysen@google.com (Chris Mysen) - ported from C++ */ -public final class MaskUtilTestCase extends TestCase { +public final class MaskUtilTestCase extends Assert { + + @Test public void testApplyMaskPenaltyRule1() { { ByteMatrix matrix = new ByteMatrix(4, 1); @@ -59,6 +62,7 @@ public final class MaskUtilTestCase extends TestCase { } } + @Test public void testApplyMaskPenaltyRule2() { { ByteMatrix matrix = new ByteMatrix(1, 1); @@ -97,6 +101,7 @@ public final class MaskUtilTestCase extends TestCase { } } + @Test public void testApplyMaskPenaltyRule3() { { // Horizontal 00001011101. @@ -164,6 +169,7 @@ public final class MaskUtilTestCase extends TestCase { } } + @Test public void testApplyMaskPenaltyRule4() { { // Dark cell ratio = 0% @@ -205,6 +211,7 @@ public final class MaskUtilTestCase extends TestCase { } // See mask patterns on the page 43 of JISX0510:2004. + @Test public void testGetDataMaskBit() { int[][] mask0 = { {1, 0, 1, 0, 1, 0},