mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
Added simple test case for command addresses, so no regression should happen.
This commit is contained in:
@@ -152,3 +152,18 @@ impl Command {
|
|||||||
self as u8
|
self as u8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn command_addr() {
|
||||||
|
assert_eq!(Command::POWER_SAVING.addr(), 0xE3);
|
||||||
|
|
||||||
|
assert_eq!(Command::PANEL_SETTING.addr(), 0x00);
|
||||||
|
|
||||||
|
assert_eq!(Command::DISPLAY_REFRESH.addr(), 0x12);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user