compiletest::header

Struct TestProps

source
pub struct TestProps {
Show 47 fields pub error_patterns: Vec<String>, pub regex_error_patterns: Vec<String>, pub compile_flags: Vec<String>, pub run_flags: Vec<String>, pub doc_flags: Vec<String>, pub pp_exact: Option<PathBuf>, pub(crate) aux: AuxProps, pub rustc_env: Vec<(String, String)>, pub unset_rustc_env: Vec<String>, pub exec_env: Vec<(String, String)>, pub unset_exec_env: Vec<String>, pub build_aux_docs: bool, pub unique_doc_out_dir: bool, pub force_host: bool, pub check_stdout: bool, pub check_run_results: bool, pub dont_check_compiler_stdout: bool, pub dont_check_compiler_stderr: bool, pub compare_output_lines_by_subset: bool, pub no_prefer_dynamic: bool, pub pretty_expanded: bool, pub pretty_mode: String, pub pretty_compare_only: bool, pub forbid_output: Vec<String>, pub revisions: Vec<String>, pub incremental_dir: Option<PathBuf>, pub incremental: bool, pub known_bug: bool, pass_mode: Option<PassMode>, ignore_pass: bool, pub fail_mode: Option<FailMode>, pub check_test_line_numbers_match: bool, pub normalize_stdout: Vec<(String, String)>, pub normalize_stderr: Vec<(String, String)>, pub failure_status: Option<i32>, pub dont_check_failure_status: bool, pub run_rustfix: bool, pub rustfix_only_machine_applicable: bool, pub assembly_output: Option<String>, pub should_ice: bool, pub stderr_per_bitwidth: bool, pub mir_unit_test: Option<String>, pub remap_src_base: bool, pub llvm_cov_flags: Vec<String>, pub filecheck_flags: Vec<String>, pub no_auto_check_cfg: bool, pub has_enzyme: bool,
}

Fields§

§error_patterns: Vec<String>§regex_error_patterns: Vec<String>§compile_flags: Vec<String>§run_flags: Vec<String>§doc_flags: Vec<String>

Extra flags to pass to rustdoc but not the compiler.

§pp_exact: Option<PathBuf>§aux: AuxProps

Auxiliary crates that should be built and made available to this test.

§rustc_env: Vec<(String, String)>§unset_rustc_env: Vec<String>§exec_env: Vec<(String, String)>§unset_exec_env: Vec<String>§build_aux_docs: bool§unique_doc_out_dir: bool

Build the documentation for each crate in a unique output directory. Uses <root output directory>/docs/<test name>/doc.

§force_host: bool§check_stdout: bool§check_run_results: bool§dont_check_compiler_stdout: bool§dont_check_compiler_stderr: bool§compare_output_lines_by_subset: bool§no_prefer_dynamic: bool§pretty_expanded: bool§pretty_mode: String§pretty_compare_only: bool§forbid_output: Vec<String>§revisions: Vec<String>§incremental_dir: Option<PathBuf>§incremental: bool§known_bug: bool§pass_mode: Option<PassMode>§ignore_pass: bool§fail_mode: Option<FailMode>§check_test_line_numbers_match: bool§normalize_stdout: Vec<(String, String)>§normalize_stderr: Vec<(String, String)>§failure_status: Option<i32>§dont_check_failure_status: bool§run_rustfix: bool§rustfix_only_machine_applicable: bool§assembly_output: Option<String>§should_ice: bool§stderr_per_bitwidth: bool§mir_unit_test: Option<String>§remap_src_base: bool§llvm_cov_flags: Vec<String>

Extra flags to pass to llvm-cov when producing coverage reports. Only used by the “coverage-run” test mode.

§filecheck_flags: Vec<String>

Extra flags to pass to LLVM’s filecheck tool, in tests that use it.

§no_auto_check_cfg: bool

Don’t automatically insert any --check-cfg args

§has_enzyme: bool

Run tests which require enzyme being build

Implementations§

source§

impl TestProps

source

pub fn new() -> Self

source

pub fn from_aux_file( &self, testfile: &Path, revision: Option<&str>, config: &Config, ) -> Self

source

pub fn from_file( testfile: &Path, revision: Option<&str>, config: &Config, ) -> Self

source

fn load_from( &mut self, testfile: &Path, test_revision: Option<&str>, config: &Config, )

Loads properties from testfile into props. If a property is tied to a particular revision foo (indicated by writing //@[foo]), then the property is ignored unless test_revision is Some("foo").

source

fn update_fail_mode(&mut self, ln: &str, config: &Config)

source

fn update_pass_mode( &mut self, ln: &str, revision: Option<&str>, config: &Config, )

source

pub fn pass_mode(&self, config: &Config) -> Option<PassMode>

source

pub fn local_pass_mode(&self) -> Option<PassMode>

Trait Implementations§

source§

impl Clone for TestProps

source§

fn clone(&self) -> TestProps

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TestProps

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 616 bytes