Skip to content
Myr

Snapshot reference Markdown output

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent 92330ce · Browse files · 1 file+8 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−12 removed

  • tests:+8 added−12 removed

1 file+8 added−12 removed

modified:tests/integration_tests.rs+8 added-12 removed
733 unmodified lines
734 1.00 sleep 2 (same speed)735 1.50 sleep 3 (slower)736 ");737 let markdown = std::fs::read_to_string(export_path).unwrap();738 for (command, relative) in [739 ("baseline", "1.00 (reference)"),740 ("sleep 1", "2.00 (faster)"),741 ("sleep 2", "1.00 (same speed)"),742 ("sleep 3", "1.50 (slower)"),743 ] {744 let row = markdown745 .lines()746 .find(|line| line.contains(command))747 .unwrap();748 assert!(row.ends_with(&format!("| {relative} |")), "{}", row);749 }738 insta::assert_snapshot!(markdown, @r"739 | Command | Mean [s] | Min [s] | Max [s] | Relative |740 |:---|---:|---:|---:|---:|741 | `baseline` | 2.000 | 2.000 | 2.000 | 1.00 (reference) |742 | `sleep 1` | 1.000 | 1.000 | 1.000 | 2.00 (faster) |743 | `sleep 2` | 2.000 | 2.000 | 2.000 | 1.00 (same speed) |744 | `sleep 3` | 3.000 | 3.000 | 3.000 | 1.50 (slower) |745 ");746747 // Equal zero times have no meaningful relative factor.748 let output = hyperfine_debug()749 .args([
526 unmodified lines