summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDiego Barrios Romero <eldruin@gmail.com>2020-06-21 22:52:41 +0200
committerDiego Barrios Romero <eldruin@gmail.com>2020-06-21 22:52:41 +0200
commit6aed921780dbe12c058e0aa0ce8b617e404b5a87 (patch)
tree3b76c4d8946aede3e48fcfade62a2e19488ee118 /tests
parentb7e9c9acf1bb42f4966930354135782bab57394a (diff)
downloadads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.tar.gz
ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.tar.xz
ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.zip
Use edition 2018
Diffstat (limited to 'tests')
-rw-r--r--tests/construction.rs2
-rw-r--r--tests/mux.rs10
-rw-r--r--tests/tier1.rs10
-rw-r--r--tests/tier2.rs6
4 files changed, 9 insertions, 19 deletions
diff --git a/tests/construction.rs b/tests/construction.rs
index f31ad2f..6d56526 100644
--- a/tests/construction.rs
+++ b/tests/construction.rs
@@ -1,5 +1,5 @@
mod common;
-use common::{
+use crate::common::{
destroy_ads1013, destroy_ads1014, destroy_ads1015, destroy_ads1113, destroy_ads1114,
destroy_ads1115, new_ads1013, new_ads1014, new_ads1015, new_ads1113, new_ads1114, new_ads1115,
};
diff --git a/tests/mux.rs b/tests/mux.rs
index 309656e..b539ebe 100644
--- a/tests/mux.rs
+++ b/tests/mux.rs
@@ -1,13 +1,9 @@
-#[macro_use(block)]
-extern crate nb;
-extern crate embedded_hal;
-extern crate embedded_hal_mock as hal;
-use hal::i2c::Transaction as I2cTrans;
-extern crate ads1x1x;
use ads1x1x::channel;
+use embedded_hal_mock::i2c::Transaction as I2cTrans;
+use nb::block;
mod common;
-use common::{
+use crate::common::{
destroy_ads1015 as destroy, new_ads1015 as new, BitFlags as BF, Config, Register,
DEVICE_ADDRESS as DEV_ADDR,
};
diff --git a/tests/tier1.rs b/tests/tier1.rs
index 89a60e0..1f1a542 100644
--- a/tests/tier1.rs
+++ b/tests/tier1.rs
@@ -1,13 +1,9 @@
-#[macro_use(block)]
-extern crate nb;
-extern crate embedded_hal;
-extern crate embedded_hal_mock as hal;
-use hal::i2c::Transaction as I2cTrans;
-extern crate ads1x1x;
use ads1x1x::{channel, DataRate12Bit, DataRate16Bit};
+use embedded_hal_mock::i2c::Transaction as I2cTrans;
+use nb::block;
mod common;
-use common::{
+use crate::common::{
destroy_ads1013, destroy_ads1113, new_ads1013, new_ads1113, BitFlags as BF, Config, Register,
DEVICE_ADDRESS as DEV_ADDR,
};
diff --git a/tests/tier2.rs b/tests/tier2.rs
index e42a348..15a7865 100644
--- a/tests/tier2.rs
+++ b/tests/tier2.rs
@@ -1,12 +1,10 @@
-extern crate embedded_hal_mock;
-use embedded_hal_mock::i2c::Transaction as I2cTrans;
-extern crate ads1x1x;
use ads1x1x::{
ComparatorLatching, ComparatorMode, ComparatorPolarity, ComparatorQueue, FullScaleRange,
};
+use embedded_hal_mock::i2c::Transaction as I2cTrans;
mod common;
-use common::{
+use crate::common::{
destroy_ads1014, new_ads1014, BitFlags as BF, Config, Register, DEVICE_ADDRESS as DEV_ADDR,
};