partial working code39

This commit is contained in:
Henry Schimke
2022-12-04 10:42:23 -06:00
parent 34e2473a5d
commit 2a32984d8d
17 changed files with 705 additions and 631 deletions

View File

@@ -0,0 +1,67 @@
/**
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
use rxing::{
oned::{CodaBarReader, Code39Reader, OneDReader},
BarcodeFormat, MultiFormatReader,
};
mod common;
/**
* @author Sean Owen
*/
#[test]
fn code39_black_box1_test_case() {
let mut tester = common::AbstractBlackBoxTestCase::new(
"test_resources/blackbox/code39-1",
MultiFormatReader::default(),
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, 180.0);
tester.test_black_box();
}
/**
* @author dswitkin@google.com (Daniel Switkin)
*/
#[test]
fn code39_black_box3_test_case() {
let mut tester = common::AbstractBlackBoxTestCase::new(
"test_resources/blackbox/code39-3",
MultiFormatReader::default(),
BarcodeFormat::CODE_39,
);
// super("src/test/resources/blackbox/code39-3", new MultiFormatReader(), BarcodeFormat.CODE_39);
tester.add_test(17, 17, 0.0);
tester.add_test(17, 17, 180.0);
tester.test_black_box();
}
/**
* @author Sean Owen
*/
#[test]
fn code39_extended_black_box2_test_case() {
let mut tester = common::AbstractBlackBoxTestCase::new(
"test_resources/blackbox/code39-2",
Code39Reader::with_all_config(false, true),
BarcodeFormat::CODE_39,
);
// super("src/test/resources/blackbox/code39-2", new Code39Reader(false, true), BarcodeFormat.CODE_39);
tester.add_test(2, 2, 0.0);
tester.add_test(2, 2, 180.0);
tester.test_black_box();
}