From 50223ad02e2f487540107e320c8bef40a9849582 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Sat, 30 Mar 2019 13:36:06 +0200 Subject: Format code --- src/conversion.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/conversion.rs') diff --git a/src/conversion.rs b/src/conversion.rs index fef80ac..2be9f1e 100644 --- a/src/conversion.rs +++ b/src/conversion.rs @@ -44,25 +44,24 @@ impl ConvertMeasurement for ic::Resolution16Bit { } } - #[cfg(test)] mod tests { use super::*; #[test] fn convert_measurement_12_bits() { - assert_eq!( 0, ic::Resolution12Bit::convert_measurement(0)); - assert_eq!( 2047, ic::Resolution12Bit::convert_measurement(0x7FFF)); + assert_eq!(0, ic::Resolution12Bit::convert_measurement(0)); + assert_eq!(2047, ic::Resolution12Bit::convert_measurement(0x7FFF)); assert_eq!(-2048, ic::Resolution12Bit::convert_measurement(0x8000)); - assert_eq!( -1, ic::Resolution12Bit::convert_measurement(0xFFFF)); + assert_eq!(-1, ic::Resolution12Bit::convert_measurement(0xFFFF)); } #[test] fn convert_measurement_16_bits() { - assert_eq!( 0, ic::Resolution16Bit::convert_measurement(0)); - assert_eq!( 32767, ic::Resolution16Bit::convert_measurement(0x7FFF)); + assert_eq!(0, ic::Resolution16Bit::convert_measurement(0)); + assert_eq!(32767, ic::Resolution16Bit::convert_measurement(0x7FFF)); assert_eq!(-32768, ic::Resolution16Bit::convert_measurement(0x8000)); - assert_eq!( -1, ic::Resolution16Bit::convert_measurement(0xFFFF)); + assert_eq!(-1, ic::Resolution16Bit::convert_measurement(0xFFFF)); } fn assert_invalid_input_data(result: Result>) { -- cgit v1.2.3-54-g00ecf