mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
Gate tests based on feature macros
This commit is contained in:
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::MultiFormatReader;
|
use rxing::MultiFormatReader;
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
*
|
*
|
||||||
* http://www.piramidepse.com/
|
* http://www.piramidepse.com/
|
||||||
*/
|
*/
|
||||||
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use rxing::{BarcodeFormat, MultiFormatReader};
|
use rxing::{BarcodeFormat, MultiFormatReader};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user