derive Default
trait for compiletest::common::Config
This commit is contained in:
parent
c36b2092bb
commit
6a347322a9
@ -16,19 +16,21 @@ pub enum ShouldPanic {
|
||||
}
|
||||
|
||||
/// Whether should console output be colored or not
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone, Default, Debug)]
|
||||
pub enum ColorConfig {
|
||||
#[default]
|
||||
AutoColor,
|
||||
AlwaysColor,
|
||||
NeverColor,
|
||||
}
|
||||
|
||||
/// Format of the test results output
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub enum OutputFormat {
|
||||
/// Verbose output
|
||||
Pretty,
|
||||
/// Quiet output
|
||||
#[default]
|
||||
Terse,
|
||||
/// JSON output
|
||||
Json,
|
||||
|
@ -69,6 +69,12 @@ pub enum Mode {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Mode {
|
||||
fn default() -> Self {
|
||||
Mode::Ui
|
||||
}
|
||||
}
|
||||
|
||||
impl Mode {
|
||||
pub fn disambiguator(self) -> &'static str {
|
||||
// Pretty-printing tests could run concurrently, and if they do,
|
||||
@ -125,7 +131,7 @@ pub enum PanicStrategy {
|
||||
}
|
||||
|
||||
/// Configuration for compiletest
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub struct Config {
|
||||
/// `true` to overwrite stderr/stdout files instead of complaining about changes in output.
|
||||
pub bless: bool,
|
||||
|
Loading…
Reference in New Issue
Block a user