Remove the TestExporter
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 6fe7738 · Browse files · 1 file·+5 added−20 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+5 added−20 removed
- other:+5 added−20 removed
Provenance
- Commit
9a46bcc- Tree
f36e4ee- Author
David Peter <mail@david-peter.de>- Committer
David Peter <sharkdp@users.noreply.github.com>- Parent
6fe7738
1 file changed+5 added−20 removed
modified:src/export/mod.rs+5 added-20 removed
116 unmodified lines117 file.write_all(content)118 .with_context(|| format!("Failed to export results to '{}'", filename))119 }120 121-#[cfg(test)]122-#[derive(Default)]123-struct TestExporter;124-125-#[cfg(test)]126-impl Exporter for TestExporter {127- fn serialize(&self, _results: &[BenchmarkResult], _unit: Option<Unit>) -> Result<Vec<u8>> {128- assert_eq!(129- "",130- "This 'Exporter' trait implementation shall only be used to test the 'unit' function!"131- );132- Ok(vec![])133- }134-}135-121 /// Check unit resolving for timing results and given unit 's'122 #[test]138-fn test_markup_table_unit_given_s() {123+fn test_determine_unit_from_results_unit_given_s() {124 use std::collections::BTreeMap;125 let results = vec![126 BenchmarkResult {127 command: String::from("sleep 2"),31 unmodified lines159 }160 161 /// Check unit resolving for timing results and given unit 'ms'162 #[test]178-fn test_markup_table_unit_given_ms() {163+fn test_determine_unit_from_results_unit_given_ms() {164 use std::collections::BTreeMap;165 let results = vec![166 BenchmarkResult {167 command: String::from("sleep 2"),31 unmodified lines199 }200 201 /// Check unit resolving for timing results using the first result entry as 's'202 #[test]218-fn test_markup_table_unit_first_s() {203+fn test_determine_unit_from_results_unit_first_s() {204 use std::collections::BTreeMap;205 let results = vec![206 BenchmarkResult {207 command: String::from("sleep 2"),31 unmodified lines239 }240 241 /// Check unit resolving for timing results using the first result entry as 'ms'242 #[test]258-fn test_markup_table_unit_first_ms() {243+fn test_determine_unit_from_results_unit_first_ms() {244 use std::collections::BTreeMap;245 let results = vec![246 BenchmarkResult {247 command: String::from("sleep 0.1"),31 unmodified lines279 }280 281 /// Check unit resolving for not timing results and no given unit defaulting to 's'282 #[test]298-fn test_markup_table_unit_default_s() {283+fn test_determine_unit_from_results_unit_default_s() {284 let results: Vec<BenchmarkResult> = vec![];285 let unit = None;286 287 let markup_actual = unit.unwrap_or_else(|| determine_unit_from_results(&results));4 unmodified lines