mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
Merge pull request #42 from SamWilsn/feature-fixes
Set `default-features = false` for image dependency
This commit is contained in:
4
.github/workflows/rust.yml
vendored
4
.github/workflows/rust.yml
vendored
@@ -20,5 +20,7 @@ jobs:
|
|||||||
run: cargo check --workspace --release --verbose
|
run: cargo check --workspace --release --verbose
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --workspace --release --verbose
|
run: cargo build --workspace --release --verbose
|
||||||
- name: Run tests
|
- name: Run tests (defaults)
|
||||||
run: cargo test --workspace --release --verbose
|
run: cargo test --workspace --release --verbose
|
||||||
|
- name: Run tests (minimal)
|
||||||
|
run: cargo test --workspace --release --verbose --no-default-features
|
||||||
|
|||||||
25
Cargo.toml
25
Cargo.toml
@@ -21,7 +21,7 @@ urlencoding = "2.1.3"
|
|||||||
uriparse = "0.6.4"
|
uriparse = "0.6.4"
|
||||||
chrono = "0.4.31"
|
chrono = "0.4.31"
|
||||||
chrono-tz = "0.8"
|
chrono-tz = "0.8"
|
||||||
image = {version = "0.24", optional = true}
|
image = {version = "0.24", optional = true, default-features = false}
|
||||||
imageproc = {version = "0.23", optional = true}
|
imageproc = {version = "0.23", optional = true}
|
||||||
unicode-segmentation = "1.10"
|
unicode-segmentation = "1.10"
|
||||||
codepage-437 = "0.1.0"
|
codepage-437 = "0.1.0"
|
||||||
@@ -41,9 +41,28 @@ rand = "0.8.5"
|
|||||||
criterion = "0.5"
|
criterion = "0.5"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["image", "client_support"]
|
default = ["image", "client_support", "image-formats"]
|
||||||
#/// Enable features required for image manipulation and reading.
|
#/// Enable features required for image manipulation and reading.
|
||||||
image = ["dep:image", "dep:imageproc"]
|
image = ["dep:image", "dep:imageproc"]
|
||||||
|
image-formats = [
|
||||||
|
"image",
|
||||||
|
"image/gif",
|
||||||
|
"image/jpeg",
|
||||||
|
"image/ico",
|
||||||
|
"image/png",
|
||||||
|
"image/pnm",
|
||||||
|
"image/tga",
|
||||||
|
"image/tiff",
|
||||||
|
"image/webp",
|
||||||
|
"image/bmp",
|
||||||
|
"image/hdr",
|
||||||
|
"image/dxt",
|
||||||
|
"image/dds",
|
||||||
|
"image/farbfeld",
|
||||||
|
"image/jpeg_rayon",
|
||||||
|
"image/openexr",
|
||||||
|
"image/qoi"
|
||||||
|
]
|
||||||
|
|
||||||
#/// Allows the ability to force ISO/IED 18004 compliance.
|
#/// Allows the ability to force ISO/IED 18004 compliance.
|
||||||
#/// Leave disabled unless specificially needed.
|
#/// Leave disabled unless specificially needed.
|
||||||
@@ -83,4 +102,4 @@ harness = false
|
|||||||
[profile.release]
|
[profile.release]
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
lto = true
|
lto = true
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|||||||
@@ -1054,6 +1054,7 @@ mod detector_test {
|
|||||||
Binarizer, BufferedImageLuminanceSource,
|
Binarizer, BufferedImageLuminanceSource,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mode_1() {
|
fn mode_1() {
|
||||||
finder_test(
|
finder_test(
|
||||||
@@ -1062,6 +1063,7 @@ mod detector_test {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mode_2() {
|
fn mode_2() {
|
||||||
finder_test(
|
finder_test(
|
||||||
@@ -1070,6 +1072,7 @@ mod detector_test {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mode_2_rot90() {
|
fn mode_2_rot90() {
|
||||||
finder_test(
|
finder_test(
|
||||||
@@ -1078,6 +1081,7 @@ mod detector_test {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mode3() {
|
fn mode3() {
|
||||||
finder_test(
|
finder_test(
|
||||||
@@ -1086,6 +1090,7 @@ mod detector_test {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mixed_sets() {
|
fn mixed_sets() {
|
||||||
finder_test(
|
finder_test(
|
||||||
@@ -1094,6 +1099,7 @@ mod detector_test {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mode4() {
|
fn mode4() {
|
||||||
finder_test(
|
finder_test(
|
||||||
@@ -1102,6 +1108,7 @@ mod detector_test {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mode5() {
|
fn mode5() {
|
||||||
finder_test(
|
finder_test(
|
||||||
@@ -1110,6 +1117,7 @@ mod detector_test {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mode6() {
|
fn mode6() {
|
||||||
finder_test(
|
finder_test(
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ use super::{GenericMultipleBarcodeReader, MultipleBarcodeReader};
|
|||||||
* Tests {@link MultipleBarcodeReader}.
|
* Tests {@link MultipleBarcodeReader}.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testMulti() {
|
fn testMulti() {
|
||||||
// Very basic test for now
|
// Very basic test for now
|
||||||
@@ -54,6 +55,7 @@ fn testMulti() {
|
|||||||
assert_eq!(&BarcodeFormat::QR_CODE, results[1].getBarcodeFormat());
|
assert_eq!(&BarcodeFormat::QR_CODE, results[1].getBarcodeFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testMultiQR() {
|
fn testMultiQR() {
|
||||||
// Very basic test for now
|
// Very basic test for now
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ mod multi_qr_code_test_case {
|
|||||||
* Tests {@link QRCodeMultiReader}.
|
* Tests {@link QRCodeMultiReader}.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testMultiQRCodes() {
|
fn testMultiQRCodes() {
|
||||||
// Very basic test for now
|
// Very basic test for now
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ impl ExpandedPair {
|
|||||||
&self.finderPattern
|
&self.finderPattern
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "image"))]
|
||||||
pub(crate) fn getFinderPatternMut(&mut self) -> &mut Option<FinderPattern> {
|
pub(crate) fn getFinderPatternMut(&mut self) -> &mut Option<FinderPattern> {
|
||||||
&mut self.finderPattern
|
&mut self.finderPattern
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ impl ExpandedRow {
|
|||||||
&self.pairs
|
&self.pairs
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "image"))]
|
||||||
pub(crate) fn getPairsMut(&mut self) -> &mut [ExpandedPair] {
|
pub(crate) fn getPairsMut(&mut self) -> &mut [ExpandedPair] {
|
||||||
&mut self.pairs
|
&mut self.pairs
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ use crate::{
|
|||||||
|
|
||||||
use super::bit_array_builder;
|
use super::bit_array_builder;
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary1() {
|
fn testDecodeRow2binary1() {
|
||||||
// (11)100224(17)110224(3102)000100
|
// (11)100224(17)110224(3102)000100
|
||||||
@@ -42,6 +43,7 @@ fn testDecodeRow2binary1() {
|
|||||||
" ...X...X .X....X. .XX...X. X..X...X ...XX.X. ..X.X... ..X.X..X ...X..X. X.X....X .X....X. .....X.. X...X...");
|
" ...X...X .X....X. .XX...X. X..X...X ...XX.X. ..X.X... ..X.X..X ...X..X. X.X....X .X....X. .....X.. X...X...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary2() {
|
fn testDecodeRow2binary2() {
|
||||||
// (01)90012345678908(3103)001750
|
// (01)90012345678908(3103)001750
|
||||||
@@ -51,12 +53,14 @@ fn testDecodeRow2binary2() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary3() {
|
fn testDecodeRow2binary3() {
|
||||||
// (10)12A
|
// (10)12A
|
||||||
assertCorrectImage2binary("3.png", " .......X ..XX..X. X.X....X .......X ....");
|
assertCorrectImage2binary("3.png", " .......X ..XX..X. X.X....X .......X ....");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary4() {
|
fn testDecodeRow2binary4() {
|
||||||
// (01)98898765432106(3202)012345(15)991231
|
// (01)98898765432106(3202)012345(15)991231
|
||||||
@@ -64,6 +68,7 @@ fn testDecodeRow2binary4() {
|
|||||||
"4.png", " ..XXXX.X XX.XXXX. .XXX.XX. XX..X... .XXXXX.. XX.X..X. ..XX..XX XX.X.XXX X..XX..X .X.XXXXX XXXX");
|
"4.png", " ..XXXX.X XX.XXXX. .XXX.XX. XX..X... .XXXXX.. XX.X..X. ..XX..XX XX.X.XXX X..XX..X .X.XXXXX XXXX");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary5() {
|
fn testDecodeRow2binary5() {
|
||||||
// (01)90614141000015(3202)000150
|
// (01)90614141000015(3202)000150
|
||||||
@@ -73,6 +78,7 @@ fn testDecodeRow2binary5() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary10() {
|
fn testDecodeRow2binary10() {
|
||||||
// (01)98898765432106(15)991231(3103)001750(10)12A(422)123(21)123456(423)0123456789012
|
// (01)98898765432106(15)991231(3103)001750(10)12A(422)123(21)123456(423)0123456789012
|
||||||
@@ -80,6 +86,7 @@ fn testDecodeRow2binary10() {
|
|||||||
" .X.XX..X XX.XXXX. .XXX.XX. XX..X... .XXXXX.. XX.X..X. ..XX...X XX.X.... X.X.X.X. X.X..X.X .X....X. XX...X.. ...XX.X. .XXXXXX. .X..XX.. X.X.X... .X...... XXXX.... XX.XX... XXXXX.X. ...XXXXX .....X.X ...X.... X.XXX..X X.X.X... XX.XX..X .X..X..X .X.X.X.X X.XX...X .XX.XXX. XXX.X.XX ..X.");
|
" .X.XX..X XX.XXXX. .XXX.XX. XX..X... .XXXXX.. XX.X..X. ..XX...X XX.X.... X.X.X.X. X.X..X.X .X....X. XX...X.. ...XX.X. .XXXXXX. .X..XX.. X.X.X... .X...... XXXX.... XX.XX... XXXXX.X. ...XXXXX .....X.X ...X.... X.XXX..X X.X.X... XX.XX..X .X..X..X .X.X.X.X X.XX...X .XX.XXX. XXX.X.XX ..X.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary11() {
|
fn testDecodeRow2binary11() {
|
||||||
// (01)98898765432106(15)991231(3103)001750(10)12A(422)123(21)123456
|
// (01)98898765432106(15)991231(3103)001750(10)12A(422)123(21)123456
|
||||||
@@ -87,6 +94,7 @@ fn testDecodeRow2binary11() {
|
|||||||
" .X.XX..X XX.XXXX. .XXX.XX. XX..X... .XXXXX.. XX.X..X. ..XX...X XX.X.... X.X.X.X. X.X..X.X .X....X. XX...X.. ...XX.X. .XXXXXX. .X..XX.. X.X.X... .X...... XXXX.... XX.XX... XXXXX.X. ...XXXXX .....X.X ...X.... X.XXX..X X.X.X... ....");
|
" .X.XX..X XX.XXXX. .XXX.XX. XX..X... .XXXXX.. XX.X..X. ..XX...X XX.X.... X.X.X.X. X.X..X.X .X....X. XX...X.. ...XX.X. .XXXXXX. .X..XX.. X.X.X... .X...... XXXX.... XX.XX... XXXXX.X. ...XXXXX .....X.X ...X.... X.XXX..X X.X.X... ....");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary12() {
|
fn testDecodeRow2binary12() {
|
||||||
// (01)98898765432106(3103)001750
|
// (01)98898765432106(3103)001750
|
||||||
@@ -96,6 +104,7 @@ fn testDecodeRow2binary12() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary13() {
|
fn testDecodeRow2binary13() {
|
||||||
// (01)90012345678908(3922)795
|
// (01)90012345678908(3922)795
|
||||||
@@ -105,6 +114,7 @@ fn testDecodeRow2binary13() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary14() {
|
fn testDecodeRow2binary14() {
|
||||||
// (01)90012345678908(3932)0401234
|
// (01)90012345678908(3932)0401234
|
||||||
@@ -112,6 +122,7 @@ fn testDecodeRow2binary14() {
|
|||||||
"14.png", " ..XX.X.. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. X.....X. X.....X. X.X.X.XX .X...... X...");
|
"14.png", " ..XX.X.. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. X.....X. X.....X. X.X.X.XX .X...... X...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary15() {
|
fn testDecodeRow2binary15() {
|
||||||
// (01)90012345678908(3102)001750(11)100312
|
// (01)90012345678908(3102)001750(11)100312
|
||||||
@@ -119,6 +130,7 @@ fn testDecodeRow2binary15() {
|
|||||||
"15.png", " ..XXX... ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
"15.png", " ..XXX... ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary16() {
|
fn testDecodeRow2binary16() {
|
||||||
// (01)90012345678908(3202)001750(11)100312
|
// (01)90012345678908(3202)001750(11)100312
|
||||||
@@ -126,6 +138,7 @@ fn testDecodeRow2binary16() {
|
|||||||
"16.png", " ..XXX..X ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
"16.png", " ..XXX..X ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary17() {
|
fn testDecodeRow2binary17() {
|
||||||
// (01)90012345678908(3102)001750(13)100312
|
// (01)90012345678908(3102)001750(13)100312
|
||||||
@@ -133,6 +146,7 @@ fn testDecodeRow2binary17() {
|
|||||||
"17.png", " ..XXX.X. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
"17.png", " ..XXX.X. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary18() {
|
fn testDecodeRow2binary18() {
|
||||||
// (01)90012345678908(3202)001750(13)100312
|
// (01)90012345678908(3202)001750(13)100312
|
||||||
@@ -140,6 +154,7 @@ fn testDecodeRow2binary18() {
|
|||||||
"18.png", " ..XXX.XX ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
"18.png", " ..XXX.XX ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary19() {
|
fn testDecodeRow2binary19() {
|
||||||
// (01)90012345678908(3102)001750(15)100312
|
// (01)90012345678908(3102)001750(15)100312
|
||||||
@@ -147,6 +162,7 @@ fn testDecodeRow2binary19() {
|
|||||||
"19.png", " ..XXXX.. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
"19.png", " ..XXXX.. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary20() {
|
fn testDecodeRow2binary20() {
|
||||||
// (01)90012345678908(3202)001750(15)100312
|
// (01)90012345678908(3202)001750(15)100312
|
||||||
@@ -154,6 +170,7 @@ fn testDecodeRow2binary20() {
|
|||||||
"20.png", " ..XXXX.X ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
"20.png", " ..XXXX.X ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary21() {
|
fn testDecodeRow2binary21() {
|
||||||
// (01)90012345678908(3102)001750(17)100312
|
// (01)90012345678908(3102)001750(17)100312
|
||||||
@@ -161,6 +178,7 @@ fn testDecodeRow2binary21() {
|
|||||||
"21.png", " ..XXXXX. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
"21.png", " ..XXXXX. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2binary22() {
|
fn testDecodeRow2binary22() {
|
||||||
// (01)90012345678908(3202)001750(17)100312
|
// (01)90012345678908(3202)001750(17)100312
|
||||||
|
|||||||
@@ -37,36 +37,43 @@ use crate::{
|
|||||||
* @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)
|
* @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string1() {
|
fn testDecodeRow2string1() {
|
||||||
assertCorrectImage2string("1.png", "(11)100224(17)110224(3102)000100");
|
assertCorrectImage2string("1.png", "(11)100224(17)110224(3102)000100");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string2() {
|
fn testDecodeRow2string2() {
|
||||||
assertCorrectImage2string("2.png", "(01)90012345678908(3103)001750");
|
assertCorrectImage2string("2.png", "(01)90012345678908(3103)001750");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string3() {
|
fn testDecodeRow2string3() {
|
||||||
assertCorrectImage2string("3.png", "(10)12A");
|
assertCorrectImage2string("3.png", "(10)12A");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string4() {
|
fn testDecodeRow2string4() {
|
||||||
assertCorrectImage2string("4.png", "(01)98898765432106(3202)012345(15)991231");
|
assertCorrectImage2string("4.png", "(01)98898765432106(3202)012345(15)991231");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string5() {
|
fn testDecodeRow2string5() {
|
||||||
assertCorrectImage2string("5.png", "(01)90614141000015(3202)000150");
|
assertCorrectImage2string("5.png", "(01)90614141000015(3202)000150");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string7() {
|
fn testDecodeRow2string7() {
|
||||||
assertCorrectImage2string("7.png", "(10)567(11)010101");
|
assertCorrectImage2string("7.png", "(10)567(11)010101");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string10() {
|
fn testDecodeRow2string10() {
|
||||||
let expected =
|
let expected =
|
||||||
@@ -74,6 +81,7 @@ fn testDecodeRow2string10() {
|
|||||||
assertCorrectImage2string("10.png", expected);
|
assertCorrectImage2string("10.png", expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string11() {
|
fn testDecodeRow2string11() {
|
||||||
assertCorrectImage2string(
|
assertCorrectImage2string(
|
||||||
@@ -82,96 +90,115 @@ fn testDecodeRow2string11() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string12() {
|
fn testDecodeRow2string12() {
|
||||||
assertCorrectImage2string("12.png", "(01)98898765432106(3103)001750");
|
assertCorrectImage2string("12.png", "(01)98898765432106(3103)001750");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string13() {
|
fn testDecodeRow2string13() {
|
||||||
assertCorrectImage2string("13.png", "(01)90012345678908(3922)795");
|
assertCorrectImage2string("13.png", "(01)90012345678908(3922)795");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string14() {
|
fn testDecodeRow2string14() {
|
||||||
assertCorrectImage2string("14.png", "(01)90012345678908(3932)0401234");
|
assertCorrectImage2string("14.png", "(01)90012345678908(3932)0401234");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string15() {
|
fn testDecodeRow2string15() {
|
||||||
assertCorrectImage2string("15.png", "(01)90012345678908(3102)001750(11)100312");
|
assertCorrectImage2string("15.png", "(01)90012345678908(3102)001750(11)100312");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string16() {
|
fn testDecodeRow2string16() {
|
||||||
assertCorrectImage2string("16.png", "(01)90012345678908(3202)001750(11)100312");
|
assertCorrectImage2string("16.png", "(01)90012345678908(3202)001750(11)100312");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string17() {
|
fn testDecodeRow2string17() {
|
||||||
assertCorrectImage2string("17.png", "(01)90012345678908(3102)001750(13)100312");
|
assertCorrectImage2string("17.png", "(01)90012345678908(3102)001750(13)100312");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string18() {
|
fn testDecodeRow2string18() {
|
||||||
assertCorrectImage2string("18.png", "(01)90012345678908(3202)001750(13)100312");
|
assertCorrectImage2string("18.png", "(01)90012345678908(3202)001750(13)100312");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string19() {
|
fn testDecodeRow2string19() {
|
||||||
assertCorrectImage2string("19.png", "(01)90012345678908(3102)001750(15)100312");
|
assertCorrectImage2string("19.png", "(01)90012345678908(3102)001750(15)100312");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string20() {
|
fn testDecodeRow2string20() {
|
||||||
assertCorrectImage2string("20.png", "(01)90012345678908(3202)001750(15)100312");
|
assertCorrectImage2string("20.png", "(01)90012345678908(3202)001750(15)100312");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string21() {
|
fn testDecodeRow2string21() {
|
||||||
assertCorrectImage2string("21.png", "(01)90012345678908(3102)001750(17)100312");
|
assertCorrectImage2string("21.png", "(01)90012345678908(3102)001750(17)100312");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string22() {
|
fn testDecodeRow2string22() {
|
||||||
assertCorrectImage2string("22.png", "(01)90012345678908(3202)001750(17)100312");
|
assertCorrectImage2string("22.png", "(01)90012345678908(3202)001750(17)100312");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string25() {
|
fn testDecodeRow2string25() {
|
||||||
assertCorrectImage2string("25.png", "(10)123");
|
assertCorrectImage2string("25.png", "(10)123");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string26() {
|
fn testDecodeRow2string26() {
|
||||||
assertCorrectImage2string("26.png", "(10)5678(11)010101");
|
assertCorrectImage2string("26.png", "(10)5678(11)010101");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string27() {
|
fn testDecodeRow2string27() {
|
||||||
assertCorrectImage2string("27.png", "(10)1098-1234");
|
assertCorrectImage2string("27.png", "(10)1098-1234");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string28() {
|
fn testDecodeRow2string28() {
|
||||||
assertCorrectImage2string("28.png", "(10)1098/1234");
|
assertCorrectImage2string("28.png", "(10)1098/1234");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string29() {
|
fn testDecodeRow2string29() {
|
||||||
assertCorrectImage2string("29.png", "(10)1098.1234");
|
assertCorrectImage2string("29.png", "(10)1098.1234");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string30() {
|
fn testDecodeRow2string30() {
|
||||||
assertCorrectImage2string("30.png", "(10)1098*1234");
|
assertCorrectImage2string("30.png", "(10)1098*1234");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string31() {
|
fn testDecodeRow2string31() {
|
||||||
assertCorrectImage2string("31.png", "(10)1098,1234");
|
assertCorrectImage2string("31.png", "(10)1098,1234");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeRow2string32() {
|
fn testDecodeRow2string32() {
|
||||||
assertCorrectImage2string(
|
assertCorrectImage2string(
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ use super::RSSExpandedReader;
|
|||||||
* @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)
|
* @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testFindFinderPatterns() {
|
fn testFindFinderPatterns() {
|
||||||
let image = readImage("2.png");
|
let image = readImage("2.png");
|
||||||
@@ -83,6 +84,7 @@ fn testFindFinderPatterns() {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testRetrieveNextPairPatterns() {
|
fn testRetrieveNextPairPatterns() {
|
||||||
let image = readImage("3.png");
|
let image = readImage("3.png");
|
||||||
@@ -111,6 +113,7 @@ fn testRetrieveNextPairPatterns() {
|
|||||||
assert_eq!(0, finderPattern.getValue());
|
assert_eq!(0, finderPattern.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeCheckCharacter() {
|
fn testDecodeCheckCharacter() {
|
||||||
let image = readImage("3.png");
|
let image = readImage("3.png");
|
||||||
@@ -139,6 +142,7 @@ fn testDecodeCheckCharacter() {
|
|||||||
assert_eq!(98, dataCharacter.getValue());
|
assert_eq!(98, dataCharacter.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodeDataCharacter() {
|
fn testDecodeDataCharacter() {
|
||||||
let image = readImage("3.png");
|
let image = readImage("3.png");
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ use super::{test_case_util, RSSExpandedReader};
|
|||||||
* Tests {@link RSSExpandedReader} handling of stacked RSS barcodes.
|
* Tests {@link RSSExpandedReader} handling of stacked RSS barcodes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testDecodingRowByRow() {
|
fn testDecodingRowByRow() {
|
||||||
let mut rssExpandedReader = RSSExpandedReader::new();
|
let mut rssExpandedReader = RSSExpandedReader::new();
|
||||||
@@ -87,6 +88,7 @@ fn testDecodingRowByRow() {
|
|||||||
assert_eq!("(01)98898765432106(3202)012345(15)991231", result.getText());
|
assert_eq!("(01)98898765432106(3202)012345(15)991231", result.getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testCompleteDecode() {
|
fn testCompleteDecode() {
|
||||||
let mut rssExpandedReader = RSSExpandedReader::new();
|
let mut rssExpandedReader = RSSExpandedReader::new();
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ impl FinderPattern {
|
|||||||
&self.startEnd
|
&self.startEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(all(test, feature = "image"))]
|
||||||
pub(crate) fn getStartEndMut(&mut self) -> &mut [usize] {
|
pub(crate) fn getStartEndMut(&mut self) -> &mut [usize] {
|
||||||
&mut self.startEnd
|
&mut self.startEnd
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ fn compareToGoldenFile(
|
|||||||
// Golden images are generated with "qrcode_sample.cc". The images are checked with both eye balls
|
// Golden images are generated with "qrcode_sample.cc". The images are checked with both eye balls
|
||||||
// and cell phones. We expect pixel-perfect results, because the error correction level is known,
|
// and cell phones. We expect pixel-perfect results, because the error correction level is known,
|
||||||
// and the pixel dimensions matches exactly.
|
// and the pixel dimensions matches exactly.
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn testRegressionTest() {
|
fn testRegressionTest() {
|
||||||
compareToGoldenFile(
|
compareToGoldenFile(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{aztec::AztecReader, BarcodeFormat};
|
use rxing::{aztec::AztecReader, BarcodeFormat};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author David Olivier
|
* @author David Olivier
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn aztec_black_box1_test_case() {
|
fn aztec_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -43,6 +45,7 @@ fn aztec_black_box1_test_case() {
|
|||||||
*
|
*
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn aztec_black_box2_test_case() {
|
fn aztec_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{oned::CodaBarReader, BarcodeFormat};
|
use rxing::{oned::CodaBarReader, BarcodeFormat};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn codabar_black_box1_test_case() {
|
fn codabar_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
@@ -5,6 +7,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn code128_black_box1_test_case() {
|
fn code128_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -23,6 +26,7 @@ fn code128_black_box1_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn code128_black_box2_test_case() {
|
fn code128_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -41,6 +45,7 @@ fn code128_black_box2_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn code128_black_box3_test_case() {
|
fn code128_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@@ -12,6 +14,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn code39_black_box1_test_case() {
|
fn code39_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -32,6 +35,7 @@ fn code39_black_box1_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn code39_black_box3_test_case() {
|
fn code39_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -50,6 +54,7 @@ fn code39_black_box3_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn code39_extended_black_box2_test_case() {
|
fn code39_extended_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn code93_black_box1_test_case() {
|
fn code93_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{qrcode::cpp_port::QrReader, BarcodeFormat, MultiUseMultiFormatReader};
|
use rxing::{qrcode::cpp_port::QrReader, BarcodeFormat, MultiUseMultiFormatReader};
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@ mod common;
|
|||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box1_test_case() {
|
fn qrcode_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -64,6 +66,7 @@ fn qrcode_black_box1_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box3_test_case() {
|
fn qrcode_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -85,6 +88,7 @@ fn qrcode_black_box3_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box4_test_case() {
|
fn qrcode_black_box4_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -109,6 +113,7 @@ fn qrcode_black_box4_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box5_test_case() {
|
fn qrcode_black_box5_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -129,6 +134,7 @@ fn qrcode_black_box5_test_case() {
|
|||||||
* rotation, which was a weak spot.
|
* rotation, which was a weak spot.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box6_test_case() {
|
fn qrcode_black_box6_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -144,6 +150,7 @@ fn qrcode_black_box6_test_case() {
|
|||||||
tester.test_black_box();
|
tester.test_black_box();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn mqr_black_box_test_case() {
|
fn mqr_black_box_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -169,6 +176,7 @@ fn mqr_black_box_test_case() {
|
|||||||
* be a function of the barcode.
|
* be a function of the barcode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn cpp_qrcode_black_box1_test_case() {
|
fn cpp_qrcode_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -189,6 +197,7 @@ fn cpp_qrcode_black_box1_test_case() {
|
|||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn cpp_qrcode_black_box2_test_case() {
|
fn cpp_qrcode_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -217,6 +226,7 @@ fn cpp_qrcode_black_box2_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn cpp_qrcode_black_box3_test_case() {
|
fn cpp_qrcode_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -239,6 +249,7 @@ fn cpp_qrcode_black_box3_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn cpp_qrcode_black_box4_test_case() {
|
fn cpp_qrcode_black_box4_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -263,6 +274,7 @@ fn cpp_qrcode_black_box4_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn cpp_qrcode_black_box5_test_case() {
|
fn cpp_qrcode_black_box5_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -283,6 +295,7 @@ fn cpp_qrcode_black_box5_test_case() {
|
|||||||
* rotation, which was a weak spot.
|
* rotation, which was a weak spot.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn cpp_qrcode_black_box6_test_case() {
|
fn cpp_qrcode_black_box6_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -298,6 +311,7 @@ fn cpp_qrcode_black_box6_test_case() {
|
|||||||
tester.test_black_box();
|
tester.test_black_box();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn cpp_qrcode_black_box7_test_case() {
|
fn cpp_qrcode_black_box7_test_case() {
|
||||||
let mut tester = common::MultiImageSpanAbstractBlackBoxTestCase::new(
|
let mut tester = common::MultiImageSpanAbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::MultiFormatReader;
|
use rxing::MultiFormatReader;
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author bbrown@google.com (Brian Brown)
|
* @author bbrown@google.com (Brian Brown)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn data_matrix_black_box1_test_case() {
|
fn data_matrix_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -40,6 +42,7 @@ fn data_matrix_black_box1_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn data_matrix_black_box2_test_case() {
|
fn data_matrix_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -59,6 +62,7 @@ fn data_matrix_black_box2_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author gitlost
|
* @author gitlost
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn data_matrix_black_box3_test_case() {
|
fn data_matrix_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn ean13_black_box1_test_case() {
|
fn ean13_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -42,6 +44,7 @@ fn ean13_black_box1_test_case() {
|
|||||||
*
|
*
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn ean13_black_box2_test_case() {
|
fn ean13_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -61,6 +64,7 @@ fn ean13_black_box2_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn ean13_black_box3_test_case() {
|
fn ean13_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -81,6 +85,7 @@ fn ean13_black_box3_test_case() {
|
|||||||
* A very difficult set of images taken with extreme shadows and highlights.
|
* A very difficult set of images taken with extreme shadows and highlights.
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn ean13_black_box4_test_case() {
|
fn ean13_black_box4_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -100,6 +105,7 @@ fn ean13_black_box4_test_case() {
|
|||||||
* A set of blurry images taken with a fixed-focus device.
|
* A set of blurry images taken with a fixed-focus device.
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn ean13_black_box5_blurry_test_case() {
|
fn ean13_black_box5_blurry_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn ean8_black_box1_test_case() {
|
fn ean8_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
|
|
||||||
use rxing::DecodingHintDictionary;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn issue_27_part_2() {
|
fn issue_27_part_2() {
|
||||||
let mut data = Vec::new();
|
let mut data = Vec::new();
|
||||||
@@ -13,8 +11,11 @@ fn issue_27_part_2() {
|
|||||||
rxing::helpers::detect_multiple_in_luma(data, 720, 618).unwrap_or_default();
|
rxing::helpers::detect_multiple_in_luma(data, 720, 618).unwrap_or_default();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image")]
|
||||||
#[test]
|
#[test]
|
||||||
fn issue_28() {
|
fn issue_28() {
|
||||||
|
use rxing::DecodingHintDictionary;
|
||||||
|
|
||||||
let mut hints: DecodingHintDictionary = DecodingHintDictionary::new();
|
let mut hints: DecodingHintDictionary = DecodingHintDictionary::new();
|
||||||
hints.insert(
|
hints.insert(
|
||||||
rxing::DecodeHintType::TRY_HARDER,
|
rxing::DecodeHintType::TRY_HARDER,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{DecodeHintType, DecodeHintValue, MultiFormatReader};
|
use rxing::{DecodeHintType, DecodeHintValue, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* Inverted barcodes
|
* Inverted barcodes
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn inverted_data_matrix_black_box_test_case() {
|
fn inverted_data_matrix_black_box_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author kevin.osullivan@sita.aero
|
* @author kevin.osullivan@sita.aero
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn itfblack_box1_test_case() {
|
fn itfblack_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -39,6 +41,7 @@ fn itfblack_box1_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn itfblack_box2_test_case() {
|
fn itfblack_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, DecodeHintType, MultiFormatReader};
|
use rxing::{BarcodeFormat, DecodeHintType, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* Tests {@link MaxiCodeReader} against a fixed set of test images.
|
* Tests {@link MaxiCodeReader} against a fixed set of test images.
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn maxicode1_test_case() {
|
fn maxicode1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -42,6 +44,7 @@ fn maxicode1_test_case() {
|
|||||||
* @author Daniel Gredler
|
* @author Daniel Gredler
|
||||||
* @see <a href="https://github.com/zxing/zxing/issues/1543">Defect 1543</a>
|
* @see <a href="https://github.com/zxing/zxing/issues/1543">Defect 1543</a>
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn maxi_code_black_box1_test_case() {
|
fn maxi_code_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
use rxing::pdf417::PDF417Reader;
|
use rxing::pdf417::PDF417Reader;
|
||||||
@@ -23,6 +25,7 @@ use rxing::pdf417::PDF417Reader;
|
|||||||
*
|
*
|
||||||
* @author Guenther Grau
|
* @author Guenther Grau
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn pdf417_black_box4_test_case() {
|
fn pdf417_black_box4_test_case() {
|
||||||
let mut tester = common::MultiImageSpanAbstractBlackBoxTestCase::new(
|
let mut tester = common::MultiImageSpanAbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::MultiFormatReader;
|
use rxing::MultiFormatReader;
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
@@ -7,6 +9,7 @@ mod common;
|
|||||||
*
|
*
|
||||||
* @author SITA Lab (kevin.osullivan@sita.aero)
|
* @author SITA Lab (kevin.osullivan@sita.aero)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn pdf417_black_box1_test_case() {
|
fn pdf417_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -28,6 +31,7 @@ fn pdf417_black_box1_test_case() {
|
|||||||
*
|
*
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn pdf417_black_box2_test_case() {
|
fn pdf417_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -44,6 +48,7 @@ fn pdf417_black_box2_test_case() {
|
|||||||
/**
|
/**
|
||||||
* Tests {@link PDF417Reader} against more sample images.
|
* Tests {@link PDF417Reader} against more sample images.
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn pdf417_black_box3_test_case() {
|
fn pdf417_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{qrcode::QRCodeReader, BarcodeFormat, MultiFormatReader};
|
use rxing::{qrcode::QRCodeReader, BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@ mod common;
|
|||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box1_test_case() {
|
fn qrcode_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -42,6 +44,7 @@ fn qrcode_black_box1_test_case() {
|
|||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box2_test_case() {
|
fn qrcode_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -62,6 +65,7 @@ fn qrcode_black_box2_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box3_test_case() {
|
fn qrcode_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -83,6 +87,7 @@ fn qrcode_black_box3_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box4_test_case() {
|
fn qrcode_black_box4_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -107,6 +112,7 @@ fn qrcode_black_box4_test_case() {
|
|||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box5_test_case() {
|
fn qrcode_black_box5_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -127,6 +133,7 @@ fn qrcode_black_box5_test_case() {
|
|||||||
* rotation, which was a weak spot.
|
* rotation, which was a weak spot.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn qrcode_black_box6_test_case() {
|
fn qrcode_black_box6_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn rss14_black_box1_test_case() {
|
fn rss14_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -39,6 +41,7 @@ fn rss14_black_box1_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn rss14_black_box2_test_case() {
|
fn rss14_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
*
|
*
|
||||||
* http://www.piramidepse.com/
|
* http://www.piramidepse.com/
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* A test of {@link RSSExpandedReader} against a fixed test set of images.
|
* A test of {@link RSSExpandedReader} against a fixed test set of images.
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn rssexpanded_black_box1_test_case() {
|
fn rssexpanded_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -49,6 +51,7 @@ fn rssexpanded_black_box1_test_case() {
|
|||||||
/**
|
/**
|
||||||
* A test of {@link RSSExpandedReader} against a fixed test set of images.
|
* A test of {@link RSSExpandedReader} against a fixed test set of images.
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn rssexpanded_black_box2_test_case() {
|
fn rssexpanded_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -67,6 +70,7 @@ fn rssexpanded_black_box2_test_case() {
|
|||||||
/**
|
/**
|
||||||
* A test of {@link RSSExpandedReader} against a fixed test set of images.
|
* A test of {@link RSSExpandedReader} against a fixed test set of images.
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn rssexpanded_black_box3_test_case() {
|
fn rssexpanded_black_box3_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -86,6 +90,7 @@ fn rssexpanded_black_box3_test_case() {
|
|||||||
* A test of {@link RSSExpandedReader} against a fixed test set of images including
|
* A test of {@link RSSExpandedReader} against a fixed test set of images including
|
||||||
* stacked RSS barcodes.
|
* stacked RSS barcodes.
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn rssexpanded_stacked_black_box1_test_case() {
|
fn rssexpanded_stacked_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -105,6 +110,7 @@ fn rssexpanded_stacked_black_box1_test_case() {
|
|||||||
* A test of {@link RSSExpandedReader} against a fixed test set of images including
|
* A test of {@link RSSExpandedReader} against a fixed test set of images including
|
||||||
* stacked RSS barcodes.
|
* stacked RSS barcodes.
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn rssexpanded_stacked_black_box2_test_case() {
|
fn rssexpanded_stacked_black_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{oned::TelepenReader, BarcodeFormat};
|
use rxing::{oned::TelepenReader, BarcodeFormat};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Chris Wood
|
* @author Chris Wood
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn telepen_alpha_test_case() {
|
fn telepen_alpha_test_case() {
|
||||||
const NUMTESTS: u32 = 5;
|
const NUMTESTS: u32 = 5;
|
||||||
@@ -37,6 +39,7 @@ fn telepen_alpha_test_case() {
|
|||||||
tester.test_black_box();
|
tester.test_black_box();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn telepen_numeric_test_case() {
|
fn telepen_numeric_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upcablack_box1_test_case() {
|
fn upcablack_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -40,6 +42,7 @@ fn upcablack_box1_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upcablack_box2_test_case() {
|
fn upcablack_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -59,6 +62,7 @@ fn upcablack_box2_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upcablack_box3_reflective_test_case() {
|
fn upcablack_box3_reflective_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -78,6 +82,7 @@ fn upcablack_box3_reflective_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upcablack_box4_test_case() {
|
fn upcablack_box4_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -97,6 +102,7 @@ fn upcablack_box4_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upcablack_box5_test_case() {
|
fn upcablack_box5_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -117,6 +123,7 @@ fn upcablack_box5_test_case() {
|
|||||||
* A set of blurry images taken with a fixed-focus device.
|
* A set of blurry images taken with a fixed-focus device.
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upcablack_box6_blurry_test_case() {
|
fn upcablack_box6_blurry_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upceblack_box1_test_case() {
|
fn upceblack_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -40,6 +42,7 @@ fn upceblack_box1_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upceblack_box2_test_case() {
|
fn upceblack_box2_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
@@ -59,6 +62,7 @@ fn upceblack_box2_test_case() {
|
|||||||
/**
|
/**
|
||||||
* @author dswitkin@google.com (Daniel Switkin)
|
* @author dswitkin@google.com (Daniel Switkin)
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upceblack_box3_reflective_test_case() {
|
fn upceblack_box3_reflective_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ mod common;
|
|||||||
/**
|
/**
|
||||||
* @author Sean Owen
|
* @author Sean Owen
|
||||||
*/
|
*/
|
||||||
|
#[cfg(feature = "image-formats")]
|
||||||
#[test]
|
#[test]
|
||||||
fn upceanextension_black_box1_test_case() {
|
fn upceanextension_black_box1_test_case() {
|
||||||
let mut tester = common::AbstractBlackBoxTestCase::new(
|
let mut tester = common::AbstractBlackBoxTestCase::new(
|
||||||
|
|||||||
Reference in New Issue
Block a user