Skip to content

Commit

Permalink
add test for adapter not found
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed May 12, 2024
1 parent b8a6ff5 commit 5496e15
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/adapter_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,14 @@ async fn vcan_bulk_send_fd() {
.send(&Frame::new(0, 0x123.into(), &[0u8; 64]).unwrap())
.await;
}

#[tokio::test]
#[serial_test::serial]
async fn socketcan_open_nonexistent() {
let e = automotive::socketcan::SocketCan::new("doestnotexist");

match e {
Err(automotive::Error::NotFound) => {}
_ => panic!("Expected NotFound error"),
}
}

0 comments on commit 5496e15

Please sign in to comment.