1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::*;
use std::time::Instant;

pub struct RunnerLoggerNative {
	start_time: Instant,
}
impl RunnerLogger for RunnerLoggerNative {
	fn start(config: &TestRunnerConfig) -> Self {
		let start_time = Instant::now();
		let intro = Self::pretty_print_intro(&config);
		println!("{intro}");
		Self { start_time }
	}
	fn end(self, results: &TestRunnerResult) {
		let duration = self.start_time.elapsed();
		let summary = results.end_str(duration);
		println!("{summary}");
	}
}