[][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?).

Implementations

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 Clone for NormalizedOutput[src]

impl Debug for NormalizedOutput[src]

impl Default for NormalizedOutput[src]

impl Deref for NormalizedOutput[src]

type Target = str

The resulting type after dereferencing.

impl Display for NormalizedOutput[src]

impl Eq for NormalizedOutput[src]

impl From<String> for NormalizedOutput[src]

impl Hash for NormalizedOutput[src]

impl Ord for NormalizedOutput[src]

impl PartialEq<NormalizedOutput> for NormalizedOutput[src]

impl PartialOrd<NormalizedOutput> for NormalizedOutput[src]

impl StructuralEq for NormalizedOutput[src]

impl StructuralPartialEq for NormalizedOutput[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Erased for T

impl<T> From<T> for T[src]

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

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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.