1 //! Enums denoting options for test execution.
3 /// Whether to execute tests concurrently or not
4 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
10 #[derive(Clone, PartialEq, Eq)]
16 #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
17 pub enum ShouldPanic {
20 YesWithMessage(&'static str),
23 #[derive(Copy, Clone, Debug)]
24 pub enum ColorConfig {
30 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
31 pub enum OutputFormat {
37 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
44 #[derive(Clone, Copy)]
45 pub enum RunStrategy {
46 /// Runs the test in the current process, and sends the result back over the
50 /// Spawns a subprocess to run the test, and sends the result back over the
51 /// supplied channel. Requires `argv[0]` to exist and point to the binary
52 /// that's currently running.
56 /// In case we want to add other options as well, just add them in this struct.
57 #[derive(Copy, Clone, Debug)]
59 pub display_output: bool,
60 pub panic_abort: bool,
64 pub fn new() -> Options {
66 display_output: false,
71 pub fn display_output(mut self, display_output: bool) -> Options {
72 self.display_output = display_output;
76 pub fn panic_abort(mut self, panic_abort: bool) -> Options {
77 self.panic_abort = panic_abort;