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;
7
8#[derive(Debug, Clone)]
9pub struct CompletedTest {
10 pub desc: TestDesc,
11 pub result: TestResult,
12 pub exec_time: Option<TestExecTime>,
13 pub stdout: Vec<u8>,
14}
15
16impl CompletedTest {
17 pub fn new(
18 desc: TestDesc,
19 result: TestResult,
20 exec_time: Option<TestExecTime>,
21 stdout: Vec<u8>,
22 ) -> Self {
23 Self { desc, result, exec_time, stdout }
24 }
25}
26
27unsafe impl Send for CompletedTest {}
28
29#[derive(Debug, Clone)]
30pub enum TestEvent {
31 TeFiltered(Vec<TestDesc>),
32 TeWait(TestDesc),
33 TeResult(CompletedTest),
34 TeTimeout(TestDesc),
35 TeFilteredOut(usize),
36}
37