code_39 passes

This commit is contained in:
Henry Schimke
2022-12-07 11:02:59 -06:00
parent 2a32984d8d
commit 1ff65fbcbe
2 changed files with 4 additions and 2 deletions

View File

@@ -228,8 +228,8 @@ impl Code39Reader {
// return new int[]{patternStart, i}; // return new int[]{patternStart, i};
} }
patternStart += (counters[0] + counters[1]) as usize; patternStart += (counters[0] + counters[1]) as usize;
let slc = counters[0..(counterPosition - 1)].to_vec(); let slc = counters[2..(counterPosition - 1 + 2)].to_vec();
counters[2..(counterPosition - 1 + 2)].clone_from_slice(&slc[..]); counters[0..(counterPosition - 1)].clone_from_slice(&slc[..]);
// System.arraycopy(counters, 2, counters, 0, counterPosition - 1); // System.arraycopy(counters, 2, counters, 0, counterPosition - 1);
counters[counterPosition - 1] = 0; counters[counterPosition - 1] = 0;
counters[counterPosition] = 0; counters[counterPosition] = 0;

View File

@@ -23,6 +23,8 @@ fn code39_black_box1_test_case() {
BarcodeFormat::CODE_39, BarcodeFormat::CODE_39,
); );
// 2 failes on row 169
// super("src/test/resources/blackbox/code39-1", new MultiFormatReader(), BarcodeFormat.CODE_39); // super("src/test/resources/blackbox/code39-1", new MultiFormatReader(), BarcodeFormat.CODE_39);
tester.add_test(4, 4, 0.0); tester.add_test(4, 4, 0.0);
tester.add_test(4, 4, 180.0); tester.add_test(4, 4, 180.0);