On 27-07-22, 10:58, Kent Gibson wrote:
diff --git a/bindings/rust/tests/line_request.rs b/bindings/rust/tests/line_request.rs
#[test]fn set_bias() {let offsets = [3];let mut config = TestConfig::new(NGPIO).unwrap();config.rconfig(Some(&offsets));config.lconfig(Some(Direction::Input), None, None, None, Some(Bias::PullUp));config.request_lines().unwrap();config.request();// Set single valueassert_eq!(config.sim().val(3).unwrap(), GPIOSIM_VALUE_ACTIVE);}- }
Test reconfigure() failure modes.
What are we specifically looking to test here ? I am not sure I understood which failures modes I should target.
Test you can reconfigure all values for all attributes (not all values for debounce obviously - just the flags).
This I have done now, with request.reconfigure_lines().
Similarly for request_lines (ideally in chip.rs)
Isn't this same as the above one? I am not sure again what I should test here.
I have pushed my current changes here, if it helps:
git@github.com:vireshk/libgpiod.git master