For test commands, there can be arguments passed to the test binary like `-- --ignored` or `-- --test-threads=1`. For these cases to work properly, the `args` parameter needs to be added to the end of the 'test' command.
18 lines
235 B
Rust
18 lines
235 B
Rust
fn main() {
|
|
println!("Hello, world!");
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod test {
|
|
#[test]
|
|
fn test_something() {
|
|
assert_eq!(1, 1);
|
|
}
|
|
|
|
#[test]
|
|
#[ignore]
|
|
fn test_something_ignored() {
|
|
assert_eq!(2, 2);
|
|
}
|
|
}
|