Attribute Macro test_with::tcp [−][src]
#[tcp]Expand description
Run test case when socket connected
#[cfg(test)]
mod tests {
// Google DNS is online
#[test_with::tcp(8.8.8.8:53)]
fn test_works() {
assert!(true);
}
// 193.194.195.196 is offline
#[test_with::tcp(193.194.195.196)]
fn test_ignored() {
panic!("should be ignored")
}
}