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

embedded-hal-1.0
Christoph Groß 2018-05-28 14:48:45 +02:00
parent f180815f87
commit 156eb43eda
1 changed files with 15 additions and 0 deletions

View File

@ -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);
}
}