Gate tests based on feature macros

This commit is contained in:
Sam Wilson
2024-01-11 00:30:42 -05:00
parent 087124f24a
commit bef115af81
22 changed files with 28 additions and 2 deletions

View File

@@ -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};

View File

@@ -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};

View File

@@ -1,3 +1,5 @@
#![cfg(feature = "image")]
use rxing::{BarcodeFormat, MultiFormatReader}; use rxing::{BarcodeFormat, MultiFormatReader};
mod common; mod common;

View File

@@ -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,

View File

@@ -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};

View File

@@ -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};

View File

@@ -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;

View File

@@ -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};

View File

@@ -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};

View File

@@ -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,

View File

@@ -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};

View File

@@ -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};

View File

@@ -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};

View File

@@ -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;

View File

@@ -1,3 +1,5 @@
#![cfg(feature = "image")]
use rxing::MultiFormatReader; use rxing::MultiFormatReader;
mod common; mod common;

View File

@@ -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};

View File

@@ -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};

View File

@@ -23,6 +23,7 @@
* *
* http://www.piramidepse.com/ * http://www.piramidepse.com/
*/ */
#![cfg(feature = "image")]
use rxing::{BarcodeFormat, MultiFormatReader}; use rxing::{BarcodeFormat, MultiFormatReader};

View File

@@ -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};

View File

@@ -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};

View File

@@ -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};

View File

@@ -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};