diff options
author | David Peter <mail@david-peter.de> | 2022-05-15 20:46:44 +0200 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2022-05-15 21:37:40 +0200 |
commit | 9a46bcc390f2bef5d9d2c9da2253f27c9ff54088 (patch) | |
tree | f36e4eeea6932d63d82d27d69f9e1fc58f992211 | |
parent | 6fe7738165940282939701ba4fa722d1128a93a6 (diff) |
Remove the TestExporter
-rw-r--r-- | src/export/mod.rs | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/src/export/mod.rs b/src/export/mod.rs index e388f68..d6f8180 100644 --- a/src/export/mod.rs +++ b/src/export/mod.rs @@ -118,24 +118,9 @@ fn write_to_file(filename: &str, content: &[u8]) -> Result<()> { .with_context(|| format!("Failed to export results to '{}'", filename)) } -#[cfg(test)] -#[derive(Default)] -struct TestExporter; - -#[cfg(test)] -impl Exporter for TestExporter { - fn serialize(&self, _results: &[BenchmarkResult], _unit: Option<Unit>) -> Result<Vec<u8>> { - assert_eq!( - "", - "This 'Exporter' trait implementation shall only be used to test the 'unit' function!" - ); - Ok(vec![]) - } -} - /// Check unit resolving for timing results and given unit 's' #[test] -fn test_markup_table_unit_given_s() { +fn test_determine_unit_from_results_unit_given_s() { use std::collections::BTreeMap; let results = vec![ BenchmarkResult { @@ -175,7 +160,7 @@ fn test_markup_table_unit_given_s() { /// Check unit resolving for timing results and given unit 'ms' #[test] -fn test_markup_table_unit_given_ms() { +fn test_determine_unit_from_results_unit_given_ms() { use std::collections::BTreeMap; let results = vec![ BenchmarkResult { @@ -215,7 +200,7 @@ fn test_markup_table_unit_given_ms() { /// Check unit resolving for timing results using the first result entry as 's' #[test] -fn test_markup_table_unit_first_s() { +fn test_determine_unit_from_results_unit_first_s() { use std::collections::BTreeMap; let results = vec![ BenchmarkResult { @@ -255,7 +240,7 @@ fn test_markup_table_unit_first_s() { /// Check unit resolving for timing results using the first result entry as 'ms' #[test] -fn test_markup_table_unit_first_ms() { +fn test_determine_unit_from_results_unit_first_ms() { use std::collections::BTreeMap; let results = vec![ BenchmarkResult { @@ -295,7 +280,7 @@ fn test_markup_table_unit_first_ms() { /// Check unit resolving for not timing results and no given unit defaulting to 's' #[test] -fn test_markup_table_unit_default_s() { +fn test_determine_unit_from_results_unit_default_s() { let results: Vec<BenchmarkResult> = vec![]; let unit = None; |