[][src]Struct testing::NormalizedOutput

pub struct NormalizedOutput(_);

Normalized stdout/stderr.

Normalization

See https://github.com/rust-lang/rust/blob/b224fc84e3/src/test/COMPILER_TESTS.md#normalization

  • The CARGO_MANIFEST_DIR directory is replaced with $DIR.

  • All backslashes () within same line as $DIR are converted to forward slashes (/) (for Windows) - All CR LF newlines are converted to LF

  • normalize-stdout is not implemented (yet?).

Methods

impl NormalizedOutput[src]

pub fn compare_to_file<P>(self, path: P) -> Result<(), Diff> where
    P: AsRef<Path>, 
[src]

If output differs, prints actual stdout/stderr to CARGO_MANIFEST_DIR/target/swc-test-results/ui/$rel_path where $rel_path: path.strip_prefix(CARGO_MANIFEST_DIR)

Trait Implementations

impl PartialEq<NormalizedOutput> for NormalizedOutput[src]

impl Default for NormalizedOutput[src]

impl Clone for NormalizedOutput[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for NormalizedOutput[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl From<String> for NormalizedOutput[src]

impl Eq for NormalizedOutput[src]

impl PartialOrd<NormalizedOutput> for NormalizedOutput[src]

impl Deref for NormalizedOutput[src]

type Target = str

The resulting type after dereferencing.

impl Display for NormalizedOutput[src]

impl Debug for NormalizedOutput[src]

impl Hash for NormalizedOutput[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, F> Fold for F where
    T: FoldWith<F>, 
[src]

fn then<F>(self, folder: F) -> AndThen<Self, F> where
    F: Fold<T>, 
[src]

Creates a folder which applies folder after self.

impl<T, F> Visit for F where
    T: VisitWith<F> + ?Sized
[src]

fn then<F>(self, visitor: F) -> AndThen<Self, F> where
    F: Visit<T>, 
[src]

Creates a folder which applies folder after self.

impl<T> Erased for T