mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
fix major issue with codabar
This commit is contained in:
@@ -21,7 +21,7 @@ use crate::{
|
||||
datamatrix::DataMatrixWriter,
|
||||
oned::{
|
||||
Code128Writer, Code39Writer, Code93Writer, EAN13Writer, EAN8Writer, ITFWriter, UPCAWriter,
|
||||
UPCEWriter,
|
||||
UPCEWriter, CodaBarWriter,
|
||||
},
|
||||
pdf417::PDF417Writer,
|
||||
qrcode::QRCodeWriter,
|
||||
@@ -67,7 +67,7 @@ impl Writer for MultiFormatWriter {
|
||||
BarcodeFormat::CODE_128 => Box::<Code128Writer>::default(),
|
||||
BarcodeFormat::ITF => Box::<ITFWriter>::default(),
|
||||
BarcodeFormat::PDF_417 => Box::<PDF417Writer>::default(),
|
||||
BarcodeFormat::CODABAR => Box::<Code128Writer>::default(),
|
||||
BarcodeFormat::CODABAR => Box::<CodaBarWriter>::default(),
|
||||
BarcodeFormat::DATA_MATRIX => Box::<DataMatrixWriter>::default(),
|
||||
BarcodeFormat::AZTEC => Box::<AztecWriter>::default(),
|
||||
_ => {
|
||||
|
||||
@@ -172,8 +172,7 @@ mod CodaBarWriterTestCase {
|
||||
fn testEncode() {
|
||||
doTest(
|
||||
"B515-3/B",
|
||||
&format!(
|
||||
"{}{}{}{}{}{}{}{}{}{}",
|
||||
concat!(
|
||||
"00000",
|
||||
"1001001011",
|
||||
"0110101001",
|
||||
@@ -192,16 +191,13 @@ mod CodaBarWriterTestCase {
|
||||
fn testEncode2() {
|
||||
doTest(
|
||||
"T123T",
|
||||
&format!(
|
||||
"{}{}{}{}{}{}{}",
|
||||
"00000",
|
||||
"1011001001",
|
||||
"0101011001",
|
||||
"0101001011",
|
||||
"0110010101",
|
||||
"01011001001",
|
||||
"00000"
|
||||
),
|
||||
concat!("00000",
|
||||
"1011001001",
|
||||
"0101011001",
|
||||
"0101001011",
|
||||
"0110010101",
|
||||
"01011001001",
|
||||
"00000"),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user