Skip to main content

use_test_status/
lib.rs

1#![forbid(unsafe_code)]
2#![doc = include_str!("../README.md")]
3
4/// Test lifecycle status vocabulary distinct from outcome vocabulary.
5#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
6pub enum TestStatus {
7    #[default]
8    Pending,
9    Running,
10    Finished,
11    Skipped,
12    Ignored,
13    Disabled,
14}
15
16#[cfg(test)]
17mod tests {
18    use super::TestStatus;
19
20    #[test]
21    fn pending_is_default_status() {
22        assert_eq!(TestStatus::default(), TestStatus::Pending);
23    }
24
25    #[test]
26    fn status_is_distinct_from_outcome() {
27        assert_eq!(TestStatus::Running, TestStatus::Running);
28        assert_ne!(TestStatus::Running, TestStatus::Finished);
29    }
30}