mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Move more tests to insta
This commit is contained in:
1 parent
7a9d04d35c
commit
da399ab654
5 files changed
+180
-565
No files matched your search
+7
-8
@@ -107,18 +107,17 @@ fn test_csv() {
|
||||
},
|
||||
},
|
||||
];
|
||||
let exps: String = String::from(
|
||||
"command,mean,stddev,median,user,system,min,max,parameter_bar,parameter_foo\n\
|
||||
FOO=one BAR=two command | 1,1,2,1,3,4,5,6,two,one\n\
|
||||
FOO=one BAR=seven command | 2,11,12,11,13,14,15,16.5,seven,one\n\
|
||||
",
|
||||
);
|
||||
let gens = String::from_utf8(
|
||||
|
||||
let actual = String::from_utf8(
|
||||
exporter
|
||||
.serialize(&results, Some(Unit::Second), SortOrder::Command)
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(exps, gens);
|
||||
insta::assert_snapshot!(actual, @r#"
|
||||
command,mean,stddev,median,user,system,min,max,parameter_bar,parameter_foo
|
||||
FOO=one BAR=two command | 1,1,2,1,3,4,5,6,two,one
|
||||
FOO=one BAR=seven command | 2,11,12,11,13,14,15,16.5,seven,one
|
||||
"#);
|
||||
}
|
||||
Reference in new issue
Block a user