Added simple test case for command addresses, so no regression should happen.

digi-v2-tests
Christoph Groß 5 years ago
parent f180815f87
commit 156eb43eda

@ -151,4 +151,19 @@ impl Command {
pub fn addr(self) -> 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);
}
}
Loading…
Cancel
Save