mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Fix symbology identifier tests (#1396)
* rename metadata test files * implement symbology identifier on ITFReader * add metadata test * remove unused code
This commit is contained in:
parent
adbf17d7a7
commit
ad061f05e2
|
@ -482,9 +482,6 @@ public final class Code128Reader extends OneDReader {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case CODE_FNC_2:
|
||||
symbologyModifier = 4;
|
||||
break;
|
||||
case CODE_CODE_A:
|
||||
codeSet = CODE_CODE_A;
|
||||
break;
|
||||
|
|
|
@ -21,6 +21,7 @@ import com.google.zxing.DecodeHintType;
|
|||
import com.google.zxing.FormatException;
|
||||
import com.google.zxing.NotFoundException;
|
||||
import com.google.zxing.Result;
|
||||
import com.google.zxing.ResultMetadataType;
|
||||
import com.google.zxing.ResultPoint;
|
||||
import com.google.zxing.common.BitArray;
|
||||
|
||||
|
@ -139,12 +140,14 @@ public final class ITFReader extends OneDReader {
|
|||
throw FormatException.getFormatInstance();
|
||||
}
|
||||
|
||||
return new Result(
|
||||
Result resultObject = new Result(
|
||||
resultString,
|
||||
null, // no natural byte representation for these barcodes
|
||||
new ResultPoint[] {new ResultPoint(startRange[1], rowNumber),
|
||||
new ResultPoint(endRange[0], rowNumber)},
|
||||
BarcodeFormat.ITF);
|
||||
resultObject.putMetadata(ResultMetadataType.SYMBOLOGY_IDENTIFIER, "]I0");
|
||||
return resultObject;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
1
core/src/test/resources/blackbox/rss14-1/1.metadata.txt
Normal file
1
core/src/test/resources/blackbox/rss14-1/1.metadata.txt
Normal file
|
@ -0,0 +1 @@
|
|||
SYMBOLOGY_IDENTIFIER=]e0
|
Loading…
Reference in a new issue