BabelStream/rust-stream/tests/integration_test.rs
Tom Lin ce4d6cfbfb Add integration tests and CI
Fix wrong nstream in plain_stream
2021-06-16 01:11:40 +01:00

18 lines
628 B
Rust

use rstest::rstest;
#[rstest]
fn test_main(
#[values(0, 1, 2)] device: usize, //
#[values("", "--pin")] pin: &str, //
#[values("", "--malloc")] malloc: &str, //
#[values("", "--init")] init: &str, //
#[values("", "--triad-only", "--nstream-only")] option: &str, //
) {
let line = format!(
"rust-stream --arraysize 2048 --device {} {} {} {} {}",
device, pin, malloc, init, option
);
let args = line.split_whitespace().map(|s| s.to_string()).collect::<Vec<_>>();
assert!(rust_stream::run(&args));
}