mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 12:52:34 +00:00
many warnings cleaned up
This commit is contained in:
@@ -78,13 +78,13 @@ fn checkWeight(weight: u32) -> u32 {
|
||||
mod AI013103DecoderTest {
|
||||
use crate::oned::rss::expanded::decoders::abstract_decoder_test_utils::*;
|
||||
|
||||
const header: &str = "..X..";
|
||||
const HEADER: &str = "..X..";
|
||||
|
||||
#[test]
|
||||
fn test0131031() {
|
||||
let data = format!(
|
||||
"{}{}{}",
|
||||
header, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
HEADER, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
);
|
||||
let expected = "(01)90012345678908(3103)001750";
|
||||
assertCorrectBinaryString(&data, expected);
|
||||
@@ -94,7 +94,7 @@ mod AI013103DecoderTest {
|
||||
fn test0131032() {
|
||||
let data = format!(
|
||||
"{}{}{}",
|
||||
header, compressedGtin900000000000008, compressed15bitWeight0
|
||||
HEADER, compressedGtin900000000000008, compressed15bitWeight0
|
||||
);
|
||||
let expected = "(01)90000000000003(3103)000000";
|
||||
assertCorrectBinaryString(&data, expected);
|
||||
@@ -105,7 +105,7 @@ mod AI013103DecoderTest {
|
||||
fn test013103invalid() {
|
||||
let data = format!(
|
||||
"{}{}{}..",
|
||||
header, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
HEADER, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
);
|
||||
assertCorrectBinaryString(&data, "");
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ use super::abstract_decoder_test_utils::*;
|
||||
* @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es)
|
||||
*/
|
||||
|
||||
const header: &str = "..X.X";
|
||||
const HEADER: &str = "..X.X";
|
||||
|
||||
#[test]
|
||||
fn test0132021() {
|
||||
let data = format!(
|
||||
"{}{}{}",
|
||||
header, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
HEADER, compressedGtin900123456798908, compressed15bitWeight1750
|
||||
);
|
||||
let expected = "(01)90012345678908(3202)001750";
|
||||
|
||||
@@ -47,7 +47,7 @@ fn test0132021() {
|
||||
fn test0132031() {
|
||||
let data = format!(
|
||||
"{}{}{}",
|
||||
header, compressedGtin900123456798908, compressed15bitWeight11750
|
||||
HEADER, compressedGtin900123456798908, compressed15bitWeight11750
|
||||
);
|
||||
let expected = "(01)90012345678908(3203)001750";
|
||||
|
||||
|
||||
@@ -139,20 +139,20 @@ impl<'a> AI013x0x1xDecoder<'_> {
|
||||
mod AI013X0X1XDecoderTest {
|
||||
use crate::oned::rss::expanded::decoders::abstract_decoder_test_utils::*;
|
||||
|
||||
const header310x11: &str = "..XXX...";
|
||||
const header320x11: &str = "..XXX..X";
|
||||
const header310x13: &str = "..XXX.X.";
|
||||
const header320x13: &str = "..XXX.XX";
|
||||
const header310x15: &str = "..XXXX..";
|
||||
const header320x15: &str = "..XXXX.X";
|
||||
const header310x17: &str = "..XXXXX.";
|
||||
const header320x17: &str = "..XXXXXX";
|
||||
const HEADER310X11: &str = "..XXX...";
|
||||
const HEADER320X11: &str = "..XXX..X";
|
||||
const HEADER310X13: &str = "..XXX.X.";
|
||||
const HEADER320X13: &str = "..XXX.XX";
|
||||
const HEADER310X15: &str = "..XXXX..";
|
||||
const HEADER320X15: &str = "..XXXX.X";
|
||||
const HEADER310X17: &str = "..XXXXX.";
|
||||
const HEADER320X17: &str = "..XXXXXX";
|
||||
|
||||
#[test]
|
||||
fn test01310X1XendDate() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header310x11,
|
||||
HEADER310X11,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateEnd
|
||||
@@ -166,7 +166,7 @@ mod AI013X0X1XDecoderTest {
|
||||
fn test01310X111() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header310x11,
|
||||
HEADER310X11,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
@@ -180,7 +180,7 @@ mod AI013X0X1XDecoderTest {
|
||||
fn test01320X111() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header320x11,
|
||||
HEADER320X11,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
@@ -194,7 +194,7 @@ mod AI013X0X1XDecoderTest {
|
||||
fn test01310X131() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header310x13,
|
||||
HEADER310X13,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
@@ -208,7 +208,7 @@ mod AI013X0X1XDecoderTest {
|
||||
fn test01320X131() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header320x13,
|
||||
HEADER320X13,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
@@ -222,7 +222,7 @@ mod AI013X0X1XDecoderTest {
|
||||
fn test01310X151() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header310x15,
|
||||
HEADER310X15,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
@@ -236,7 +236,7 @@ mod AI013X0X1XDecoderTest {
|
||||
fn test01320X151() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header320x15,
|
||||
HEADER320X15,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
@@ -250,7 +250,7 @@ mod AI013X0X1XDecoderTest {
|
||||
fn test01310X171() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header310x17,
|
||||
HEADER310X17,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
@@ -264,7 +264,7 @@ mod AI013X0X1XDecoderTest {
|
||||
fn test01320X171() {
|
||||
let data = format!(
|
||||
"{}{}{}{}",
|
||||
header320x17,
|
||||
HEADER320X17,
|
||||
compressedGtin900123456798908,
|
||||
compressed20bitWeight1750,
|
||||
compressedDateMarch12th2010
|
||||
|
||||
@@ -48,7 +48,7 @@ impl DecodedNumeric {
|
||||
pub fn new(newPosition: usize, firstDigit: u32, secondDigit: u32) -> Result<Self, Exceptions> {
|
||||
// super(newPosition);
|
||||
|
||||
if firstDigit < 0 || firstDigit > 10 || secondDigit < 0 || secondDigit > 10 {
|
||||
if /*firstDigit < 0 ||*/ firstDigit > 10 || /*secondDigit < 0 ||*/ secondDigit > 10 {
|
||||
return Err(Exceptions::FormatException(
|
||||
".getFormatInstance();".to_owned(),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user