projects
/
zxing.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
At last update to JUnit 4.x
[zxing.git]
/
core
/
test
/
src
/
com
/
google
/
zxing
/
qrcode
/
encoder
/
MaskUtilTestCase.java
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
183cdb1
..
2a59a46
100644
(file)
--- 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;
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++
*/
/**
* @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);
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);
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.
public void testApplyMaskPenaltyRule3() {
{
// Horizontal 00001011101.
@@
-164,6
+169,7
@@
public final class MaskUtilTestCase extends TestCase {
}
}
}
}
+ @Test
public void testApplyMaskPenaltyRule4() {
{
// Dark cell ratio = 0%
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.
}
// See mask patterns on the page 43 of JISX0510:2004.
+ @Test
public void testGetDataMaskBit() {
int[][] mask0 = {
{1, 0, 1, 0, 1, 0},
public void testGetDataMaskBit() {
int[][] mask0 = {
{1, 0, 1, 0, 1, 0},