possibility to truncate timeseries with --start/stop cli arguments

This commit is contained in:
Daniel Bauer
2018-12-04 16:56:43 +01:00
parent 79db640a7b
commit d758c843d8
7 changed files with 54 additions and 24 deletions

View File

@@ -16,21 +16,6 @@ mod integration {
assert!(out.contains(expected_error));
}
#[test]
fn data_out_of_bonds() {
let output = Command::new("./target/debug/wham")
.args(&["--bins", "100", "--min", "2.0", "--max", "3.0", "-T", "300"])
.args(&["-f", "example/1d/metadata.dat"])
.args(&["-o", "/dev/null"])
.output()
.expect("failed to execute process");
let output = String::from_utf8_lossy(&output.stderr);
println!("{}", output);
assert!(output.to_string().contains(
"No data points in histogram boundaries"
));
}
#[test]
fn unparseable_bias_pos() {
let output = Command::new("./target/debug/wham")
@@ -107,6 +92,25 @@ mod integration {
));
}
#[test]
fn skip_rows() {
let output = Command::new("./target/debug/wham")
.args(&["--bins", "100", "--max", "3.14", "--min", "-3.14", "-T", "300", "--cyclic"])
.args(&["-f", "example/1d/metadata.dat"])
.args(&["-o", "/tmp/wham_test_1d.out"])
.args(&["--start", "50", "--end", "60"])
.args(&["-v"])
.output()
.expect("failed to execute process");
let output = String::from_utf8_lossy(&output.stdout);
println!("{}", output);
assert!(output.to_string().contains(
"25 windows, 12489 datapoints"
));
}
#[test]
fn wham_1d() {;
Command::new("./target/debug/wham")