X-Git-Url: http://git.rot13.org/?p=zxing.git;a=blobdiff_plain;f=core%2Ftest%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Foned%2FITFBlackBox1TestCase.java;h=64050c901e091314f312c8a1abd94fbb523209ca;hp=a1aa561903651ead1ab0d68e749b35bb336fd4e3;hb=2d9efc5f0d19d70fb4f240f506bc23992ab3fde6;hpb=7e271e44cbc65241a9dc73e47d6acf6f7e5ef150 diff --git a/core/test/src/com/google/zxing/oned/ITFBlackBox1TestCase.java b/core/test/src/com/google/zxing/oned/ITFBlackBox1TestCase.java index a1aa5619..64050c90 100644 --- a/core/test/src/com/google/zxing/oned/ITFBlackBox1TestCase.java +++ b/core/test/src/com/google/zxing/oned/ITFBlackBox1TestCase.java @@ -17,43 +17,18 @@ package com.google.zxing.oned; import com.google.zxing.BarcodeFormat; -import com.google.zxing.DecodeHintType; import com.google.zxing.MultiFormatReader; import com.google.zxing.common.AbstractBlackBoxTestCase; -import java.io.File; -import java.util.Hashtable; -import java.util.Vector; - /** * @author kevin.osullivan@sita.aero */ public final class ITFBlackBox1TestCase extends AbstractBlackBoxTestCase { public ITFBlackBox1TestCase() { - super(new File("test/data/blackbox/itf-1"), new MultiFormatReader(), BarcodeFormat.ITF); + super("test/data/blackbox/itf-1", new MultiFormatReader(), BarcodeFormat.ITF); addTest(9, 12, 0.0f); - } - - // TODO(dswitkin): This is only used for the mean time because ITF is not turned on by default. - // The other formats are included here to make sure we don't recognize an ITF barcode as something - // else. Unfortunately this list is fragile. The right thing to do is profile ITF for performance, - // and if it doesn't impose significant overhead, turn it on by default. Then this method can be - // removed completely. - @Override - protected Hashtable getHints() { - Hashtable hints = new Hashtable(3); - Vector vector = new Vector(); - vector.addElement(BarcodeFormat.UPC_A); - vector.addElement(BarcodeFormat.UPC_E); - vector.addElement(BarcodeFormat.EAN_13); - vector.addElement(BarcodeFormat.EAN_8); - vector.addElement(BarcodeFormat.CODE_39); - vector.addElement(BarcodeFormat.CODE_128); - vector.addElement(BarcodeFormat.ITF); - vector.addElement(BarcodeFormat.QR_CODE); - hints.put(DecodeHintType.POSSIBLE_FORMATS, vector); - return hints; + addTest(12, 12, 180.0f); } }