X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=core%2Ftest%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Foned%2FEAN8WriterTestCase.java;fp=core%2Ftest%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Foned%2FEAN8WriterTestCase.java;h=f3f7e16a28cfdcd7e1afe8911a5b72704d779966;hp=653758356749f19c02c3d96e98a85d7552d23bef;hb=e5d03a79a458340b69a57914a352f0a8841cdf69;hpb=a932cce57fabafd18a5db770f2c87afbd72e31b9 diff --git a/core/test/src/com/google/zxing/oned/EAN8WriterTestCase.java b/core/test/src/com/google/zxing/oned/EAN8WriterTestCase.java index 65375835..f3f7e16a 100644 --- a/core/test/src/com/google/zxing/oned/EAN8WriterTestCase.java +++ b/core/test/src/com/google/zxing/oned/EAN8WriterTestCase.java @@ -19,20 +19,20 @@ package com.google.zxing.oned; import com.google.zxing.BarcodeFormat; import com.google.zxing.WriterException; import com.google.zxing.common.BitMatrix; -import junit.framework.TestCase; +import org.junit.Assert; +import org.junit.Test; /** * @author Ari Pollak */ -public final class EAN8WriterTestCase extends TestCase { +public final class EAN8WriterTestCase extends Assert { + @Test public void testEncode() throws WriterException { String testStr = "0001010001011010111101111010110111010101001110111001010001001011100101000"; BitMatrix result = new EAN8Writer().encode("96385074", BarcodeFormat.EAN_8, testStr.length(), 0); for (int i = 0; i < testStr.length(); i++) { - assertEquals("Element " + i, - testStr.charAt(i) == '1', - result.get(i, 0)); + assertEquals("Element " + i, testStr.charAt(i) == '1', result.get(i, 0)); } }