From beecc9d9349d9c4e05f0c9fa51b00caf0dcd9fb7 Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Tue, 6 Aug 2019 20:52:24 +0200 Subject: [PATCH] fix tests without f16 --- src/consts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/consts.rs b/src/consts.rs index 96d7c16..daa5e60 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -228,11 +228,11 @@ pub const LN_10: FixedU128 = FixedU128 { mod tests { use crate::{consts::*, traits::FromFixed}; use core::{f32, f64}; - use half::{self, f16}; #[cfg(feature = "f16")] #[test] fn cmp_f16() { + use half::{self, f16}; assert_eq!(f16::from_fixed(TAU), f16::from_f32(f32::consts::PI * 2.0)); assert_eq!(f16::from_fixed(FRAC_TAU_2), half::consts::PI); assert_eq!(