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:
MakKi (makki_d) 2021-06-07 21:11:10 +09:00 committed by GitHub
parent adbf17d7a7
commit ad061f05e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 5 additions and 4 deletions

View file

@ -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;

View file

@ -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;
}
/**

View file

@ -0,0 +1 @@
SYMBOLOGY_IDENTIFIER=]e0