Skip to main content

TestProps

Struct TestProps 

Source
pub(crate) struct TestProps {
Show 49 fields pub(crate) error_patterns: Vec<String>, pub(crate) regex_error_patterns: Vec<String>, pub(crate) edition: Option<Edition>, pub(crate) compile_flags: Vec<String>, pub(crate) run_flags: Vec<String>, pub(crate) doc_flags: Vec<String>, pub(crate) pp_exact: Option<Utf8PathBuf>, pub(crate) aux: AuxProps, pub(crate) rustc_env: Vec<(String, String)>, pub(crate) unset_rustc_env: Vec<String>, pub(crate) exec_env: Vec<(String, String)>, pub(crate) unset_exec_env: Vec<String>, pub(crate) build_aux_docs: bool, pub(crate) unique_doc_out_dir: bool, pub(crate) force_host: bool, pub(crate) check_stdout: bool, pub(crate) check_run_results: bool, pub(crate) dont_check_compiler_stdout: bool, pub(crate) dont_check_compiler_stderr: bool, pub(crate) no_prefer_dynamic: bool, pub(crate) pretty_mode: String, pub(crate) pretty_compare_only: bool, pub(crate) forbid_output: Vec<String>, pub(crate) revisions: Vec<String>, pub(crate) incremental_dir: Option<Utf8PathBuf>, pub(crate) incremental: bool, pub(crate) known_bug: bool, pass_mode: Option<PassMode>, ignore_pass: bool, pub(crate) fail_mode: Option<FailMode>, pub(crate) check_test_line_numbers_match: bool, pub(crate) normalize_stdout: Vec<(String, String)>, pub(crate) normalize_stderr: Vec<(String, String)>, pub(crate) failure_status: Option<i32>, pub(crate) dont_check_failure_status: bool, pub(crate) run_rustfix: bool, pub(crate) rustfix_only_machine_applicable: bool, pub(crate) assembly_output: Option<String>, pub(crate) stderr_per_bitwidth: bool, pub(crate) mir_unit_test: Option<String>, pub(crate) remap_src_base: bool, pub(crate) llvm_cov_flags: Vec<String>, pub(crate) filecheck_flags: Vec<String>, pub(crate) no_auto_check_cfg: bool, pub(crate) add_minicore: bool, pub(crate) minicore_compile_flags: Vec<String>, pub(crate) dont_require_annotations: HashSet<ErrorKind>, pub(crate) disable_gdb_pretty_printers: bool, pub(crate) compare_output_by_lines: bool,
}

Fields§

§error_patterns: Vec<String>§regex_error_patterns: Vec<String>§edition: Option<Edition>

Edition selected by an //@ edition directive, if any.

Automatically added to compile_flags during directive processing.

§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<Utf8PathBuf>§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§no_prefer_dynamic: bool§pretty_mode: String§pretty_compare_only: bool§forbid_output: Vec<String>§revisions: Vec<String>§incremental_dir: Option<Utf8PathBuf>§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>§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

§add_minicore: bool

Build and use minicore as core stub for no_core tests in cross-compilation scenarios that don’t otherwise want/need -Z build-std.

§minicore_compile_flags: Vec<String>

Add these flags to the build of minicore.

§dont_require_annotations: HashSet<ErrorKind>

Whether line annotations are required for the given error kind.

§disable_gdb_pretty_printers: bool

Whether pretty printers should be disabled in gdb.

§compare_output_by_lines: bool

Compare the output by lines, rather than as a single string.

Implementations§

Source§

impl TestProps

Source

pub(crate) fn new() -> Self

Source

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

Source

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

Source

fn load_from( &mut self, testfile: &Utf8Path, 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: &DirectiveLine<'_>, config: &Config)

Source

fn update_pass_mode(&mut self, ln: &DirectiveLine<'_>, config: &Config)

Source

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

Source

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

Source

fn update_add_minicore(&mut self, ln: &DirectiveLine<'_>, config: &Config)

Trait Implementations§

Source§

impl Clone for TestProps

Source§

fn clone(&self) -> TestProps

Returns a duplicate 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, dest: *mut u8)

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
§

impl<T> WithSubscriber for T

§

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
§

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: 712 bytes