mirror of https://github.com/eldruin/ds323x-rs
Separate exclusive tests
parent
b70f4a6ffa
commit
8734afa03f
|
@ -0,0 +1,12 @@
|
|||
#[deny(warnings)]
|
||||
|
||||
extern crate embedded_hal_mock as hal;
|
||||
extern crate ds323x;
|
||||
use ds323x::Ds323x;
|
||||
|
||||
#[test]
|
||||
fn can_create_and_destroy() {
|
||||
let dev = Ds323x::new_ds3232(hal::i2c::Mock::new(&[]));
|
||||
let mut i2c = dev.destroy_ds3232();
|
||||
i2c.done();
|
||||
}
|
|
@ -45,18 +45,6 @@ macro_rules! set_param_test_2_4 {
|
|||
};
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_create_and_destroy_ds3232() {
|
||||
let dev = new_ds3232(&[]);
|
||||
destroy_ds3232(dev);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_create_and_destroy_ds3234() {
|
||||
let dev = new_ds3234(&[]);
|
||||
destroy_ds3234(dev);
|
||||
}
|
||||
|
||||
const DEFAULT_WRITE_STATUS: u8 = DS323X_POR_STATUS | BF::ALARM2F | BF::ALARM1F;
|
||||
|
||||
call_method_status_test!(can_en_32khz_bat, enable_32khz_output_on_battery,
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#[deny(warnings)]
|
||||
|
||||
extern crate embedded_hal_mock as hal;
|
||||
extern crate ds323x;
|
||||
|
||||
#[allow(unused)]
|
||||
mod common;
|
||||
use common::{ new_ds3234, destroy_ds3234 };
|
||||
|
||||
#[test]
|
||||
fn can_create_and_destroy_ds3234() {
|
||||
let dev = new_ds3234(&[]);
|
||||
destroy_ds3234(dev);
|
||||
}
|
Loading…
Reference in New Issue