mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-03 01:21:25 +00:00
Change message for identical time and add test for it
This commit is contained in:
1 parent
9134337b62
commit
13547e973c
2 files changed
+39
-10
No files matched your search
@@ -461,6 +461,24 @@ fn shows_benchmark_comparison_with_relative_times() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shows_benchmark_comparison_with_same_time() {
|
||||
hyperfine_debug()
|
||||
.arg("--command-name=A")
|
||||
.arg("--command-name=B")
|
||||
.arg("sleep 1.0")
|
||||
.arg("sleep 1.0")
|
||||
.arg("sleep 2.0")
|
||||
.arg("sleep 1000.0")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(
|
||||
predicate::str::contains("As fast (1.00 ± 0.00) as")
|
||||
.and(predicate::str::contains("2.00 ± 0.00 times faster"))
|
||||
.and(predicate::str::contains("1000.00 ± 0.00 times faster")),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shows_benchmark_comparison_relative_to_reference() {
|
||||
hyperfine_debug()
|
||||
|
||||
Reference in new issue
Block a user