chore: prepare for release

update version to v0.5.5.

fixes: #48
changes name of `image-formats` to `image_formats` to more allign with the naming convention of the library.
This commit is contained in:
Henry Schimke
2024-01-30 17:26:51 -06:00
parent aa6128280e
commit 297ea7bf80
33 changed files with 666 additions and 134 deletions

View File

@@ -1054,7 +1054,7 @@ mod detector_test {
Binarizer, BufferedImageLuminanceSource,
};
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn mode_1() {
finder_test(
@@ -1063,7 +1063,7 @@ mod detector_test {
)
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn mode_2() {
finder_test(
@@ -1072,7 +1072,7 @@ mod detector_test {
)
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn mode_2_rot90() {
finder_test(
@@ -1081,7 +1081,7 @@ mod detector_test {
)
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn mode3() {
finder_test(
@@ -1090,7 +1090,7 @@ mod detector_test {
)
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn mixed_sets() {
finder_test(
@@ -1099,7 +1099,7 @@ mod detector_test {
)
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn mode4() {
finder_test(
@@ -1108,7 +1108,7 @@ mod detector_test {
)
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn mode5() {
finder_test(
@@ -1117,7 +1117,7 @@ mod detector_test {
)
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn mode6() {
finder_test(

View File

@@ -27,7 +27,7 @@ use super::{GenericMultipleBarcodeReader, MultipleBarcodeReader};
* Tests {@link MultipleBarcodeReader}.
*/
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testMulti() {
// Very basic test for now
@@ -55,7 +55,7 @@ fn testMulti() {
assert_eq!(&BarcodeFormat::QR_CODE, results[1].getBarcodeFormat());
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testMultiQR() {
// Very basic test for now

View File

@@ -237,7 +237,7 @@ mod multi_qr_code_test_case {
* Tests {@link QRCodeMultiReader}.
*/
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testMultiQRCodes() {
// Very basic test for now

View File

@@ -35,7 +35,7 @@ use crate::{
use super::bit_array_builder;
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary1() {
// (11)100224(17)110224(3102)000100
@@ -43,7 +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...");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary2() {
// (01)90012345678908(3103)001750
@@ -53,14 +53,14 @@ fn testDecodeRow2binary2() {
);
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary3() {
// (10)12A
assertCorrectImage2binary("3.png", " .......X ..XX..X. X.X....X .......X ....");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary4() {
// (01)98898765432106(3202)012345(15)991231
@@ -68,7 +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");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary5() {
// (01)90614141000015(3202)000150
@@ -78,7 +78,7 @@ fn testDecodeRow2binary5() {
);
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary10() {
// (01)98898765432106(15)991231(3103)001750(10)12A(422)123(21)123456(423)0123456789012
@@ -86,7 +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.");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary11() {
// (01)98898765432106(15)991231(3103)001750(10)12A(422)123(21)123456
@@ -94,7 +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... ....");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary12() {
// (01)98898765432106(3103)001750
@@ -104,7 +104,7 @@ fn testDecodeRow2binary12() {
);
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary13() {
// (01)90012345678908(3922)795
@@ -114,7 +114,7 @@ fn testDecodeRow2binary13() {
);
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary14() {
// (01)90012345678908(3932)0401234
@@ -122,7 +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...");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary15() {
// (01)90012345678908(3102)001750(11)100312
@@ -130,7 +130,7 @@ fn testDecodeRow2binary15() {
"15.png", " ..XXX... ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary16() {
// (01)90012345678908(3202)001750(11)100312
@@ -138,7 +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..");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary17() {
// (01)90012345678908(3102)001750(13)100312
@@ -146,7 +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..");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary18() {
// (01)90012345678908(3202)001750(13)100312
@@ -154,7 +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..");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary19() {
// (01)90012345678908(3102)001750(15)100312
@@ -162,7 +162,7 @@ fn testDecodeRow2binary19() {
"19.png", " ..XXXX.. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary20() {
// (01)90012345678908(3202)001750(15)100312
@@ -170,7 +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..");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary21() {
// (01)90012345678908(3102)001750(17)100312
@@ -178,7 +178,7 @@ fn testDecodeRow2binary21() {
"21.png", " ..XXXXX. ........ .X..XXX. X.X.X... XX.XXXXX .XXXX.X. ..XX...X .X.....X .XX..... XXXX.X.. XX..");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2binary22() {
// (01)90012345678908(3202)001750(17)100312

View File

@@ -37,43 +37,43 @@ use crate::{
* @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)
*/
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string1() {
assertCorrectImage2string("1.png", "(11)100224(17)110224(3102)000100");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string2() {
assertCorrectImage2string("2.png", "(01)90012345678908(3103)001750");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string3() {
assertCorrectImage2string("3.png", "(10)12A");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string4() {
assertCorrectImage2string("4.png", "(01)98898765432106(3202)012345(15)991231");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string5() {
assertCorrectImage2string("5.png", "(01)90614141000015(3202)000150");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string7() {
assertCorrectImage2string("7.png", "(10)567(11)010101");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string10() {
let expected =
@@ -81,7 +81,7 @@ fn testDecodeRow2string10() {
assertCorrectImage2string("10.png", expected);
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string11() {
assertCorrectImage2string(
@@ -90,115 +90,115 @@ fn testDecodeRow2string11() {
);
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string12() {
assertCorrectImage2string("12.png", "(01)98898765432106(3103)001750");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string13() {
assertCorrectImage2string("13.png", "(01)90012345678908(3922)795");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string14() {
assertCorrectImage2string("14.png", "(01)90012345678908(3932)0401234");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string15() {
assertCorrectImage2string("15.png", "(01)90012345678908(3102)001750(11)100312");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string16() {
assertCorrectImage2string("16.png", "(01)90012345678908(3202)001750(11)100312");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string17() {
assertCorrectImage2string("17.png", "(01)90012345678908(3102)001750(13)100312");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string18() {
assertCorrectImage2string("18.png", "(01)90012345678908(3202)001750(13)100312");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string19() {
assertCorrectImage2string("19.png", "(01)90012345678908(3102)001750(15)100312");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string20() {
assertCorrectImage2string("20.png", "(01)90012345678908(3202)001750(15)100312");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string21() {
assertCorrectImage2string("21.png", "(01)90012345678908(3102)001750(17)100312");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string22() {
assertCorrectImage2string("22.png", "(01)90012345678908(3202)001750(17)100312");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string25() {
assertCorrectImage2string("25.png", "(10)123");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string26() {
assertCorrectImage2string("26.png", "(10)5678(11)010101");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string27() {
assertCorrectImage2string("27.png", "(10)1098-1234");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string28() {
assertCorrectImage2string("28.png", "(10)1098/1234");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string29() {
assertCorrectImage2string("29.png", "(10)1098.1234");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string30() {
assertCorrectImage2string("30.png", "(10)1098*1234");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string31() {
assertCorrectImage2string("31.png", "(10)1098,1234");
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeRow2string32() {
assertCorrectImage2string(

View File

@@ -37,7 +37,7 @@ use super::RSSExpandedReader;
* @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es)
*/
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testFindFinderPatterns() {
let image = readImage("2.png");
@@ -84,7 +84,7 @@ fn testFindFinderPatterns() {
// }
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testRetrieveNextPairPatterns() {
let image = readImage("3.png");
@@ -113,7 +113,7 @@ fn testRetrieveNextPairPatterns() {
assert_eq!(0, finderPattern.getValue());
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeCheckCharacter() {
let image = readImage("3.png");
@@ -142,7 +142,7 @@ fn testDecodeCheckCharacter() {
assert_eq!(98, dataCharacter.getValue());
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodeDataCharacter() {
let image = readImage("3.png");

View File

@@ -32,7 +32,7 @@ use super::{test_case_util, RSSExpandedReader};
* Tests {@link RSSExpandedReader} handling of stacked RSS barcodes.
*/
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testDecodingRowByRow() {
let mut rssExpandedReader = RSSExpandedReader::new();
@@ -88,7 +88,7 @@ fn testDecodingRowByRow() {
assert_eq!("(01)98898765432106(3202)012345(15)991231", result.getText());
}
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testCompleteDecode() {
let mut rssExpandedReader = RSSExpandedReader::new();

View File

@@ -159,7 +159,7 @@ fn compareToGoldenFile(
// 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 the pixel dimensions matches exactly.
#[cfg(feature = "image-formats")]
#[cfg(feature = "image_formats")]
#[test]
fn testRegressionTest() {
compareToGoldenFile(