extern crate termios; #[test] fn initial_output_speed_should_be_zero() { use termios::{termios, TermiosExt}; let t = termios::new(); assert_eq!(t.get_output_speed(), 0); } #[test] fn initial_input_speed_should_be_zero() { use termios::{termios, TermiosExt}; let t = termios::new(); assert_eq!(t.get_input_speed(), 0); } #[test] fn output_speed_get_after_set_should_match() { use termios::{termios, TermiosExt, B50}; let mut t = termios::new(); let _ = t.set_output_speed(B50); assert_eq!(t.get_output_speed(), B50); } #[test] fn input_speed_get_after_set_should_match() { use termios::{termios, TermiosExt, B50}; let mut t = termios::new(); let _ = t.set_input_speed(B50); assert_eq!(t.get_input_speed(), B50); } #[test] fn set_io_speed_should_change_both_input_and_output() { use termios::{termios, TermiosExt, B50}; let mut t = termios::new(); let _ = t.set_io_speed(B50); assert_eq!(t.get_input_speed(), B50); assert_eq!(t.get_output_speed(), B50); }