forked from M-Labs/thermostat
Add command parser test for polarity command
This commit is contained in:
parent
d517087e10
commit
fcb5cf1d4e
@ -694,6 +694,15 @@ mod test {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn parse_pwm_polarity() {
|
||||||
|
let command = Command::parse(b"pwm 0 polarity reversed");
|
||||||
|
assert_eq!(command, Ok(Command::PwmPolarity {
|
||||||
|
channel: 0,
|
||||||
|
polarity: Polarity::Reversed,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_pwm_pid() {
|
fn parse_pwm_pid() {
|
||||||
let command = Command::parse(b"pwm 0 pid");
|
let command = Command::parse(b"pwm 0 pid");
|
||||||
|
Loading…
Reference in New Issue
Block a user