1//! Module containing different events that can occur
2//! during tests execution process.
3
4use super::test_result::TestResult;
5use super::time::TestExecTime;
6use super::types::{TestDesc, TestId};
7
8#[derive(Debug, Clone)]
9pub struct CompletedTest {
10 pub id: TestId,
11 pub desc: TestDesc,
12 pub result: TestResult,
13 pub exec_time: Option<TestExecTime>,
14 pub stdout: Vec<u8>,
15}
16
17impl CompletedTest {
18 pub fn new(
19 id: TestId,
20 desc: TestDesc,
21 result: TestResult,
22 exec_time: Option<TestExecTime>,
23 stdout: Vec<u8>,
24 ) -> Self {
25 Self { id, desc, result, exec_time, stdout }
26 }
27}
28
29#[derive(Debug, Clone)]
30pub enum TestEvent {
31 TeFiltered(usize, Option<u64>),
32 TeWait(TestDesc),
33 TeResult(CompletedTest),
34 TeTimeout(TestDesc),
35 TeFilteredOut(usize),
36}
37