MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_gpio_setup_errors

Function test_gpio_setup_errors

std/src/gpio/mod.rs:563–572  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

561
562 #[test]
563 fn test_gpio_setup_errors() {
564 check_stmt_compilation_err("1:1: GPIO_SETUP expected pin%, mode$", r#"GPIO_SETUP"#);
565 check_stmt_compilation_err("1:1: GPIO_SETUP expected pin%, mode$", r#"GPIO_SETUP 1"#);
566 check_stmt_compilation_err("1:13: GPIO_SETUP expected pin%, mode$", r#"GPIO_SETUP 1; 2"#);
567 check_stmt_compilation_err("1:1: GPIO_SETUP expected pin%, mode$", r#"GPIO_SETUP 1, 2, 3"#);
568
569 check_pin_validation("1:12: ", "1:12: ", r#"GPIO_SETUP _PIN_, "IN""#);
570
571 check_stmt_err(r#"1:15: Unknown pin mode IN-OUT"#, r#"GPIO_SETUP 1, "IN-OUT""#);
572 }
573
574 #[test]
575 fn test_gpio_clear_all() {

Callers

nothing calls this directly

Calls 3

check_pin_validationFunction · 0.85
check_stmt_errFunction · 0.85

Tested by

no test coverage detected