testing

Type Alias StdErr

source
pub type StdErr = NormalizedOutput;

Aliased Type§

struct StdErr(/* private fields */);

Implementations

source§

impl NormalizedOutput

source

pub fn new_raw(s: String) -> Self

source

pub fn compare_json_to_file<T>(actual: &T, path: &Path)
where T: Serialize,

source

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

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

source§

impl Clone for NormalizedOutput

source§

fn clone(&self) -> NormalizedOutput

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 NormalizedOutput

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for NormalizedOutput

source§

fn default() -> NormalizedOutput

Returns the “default value” for a type. Read more
source§

impl Deref for NormalizedOutput

source§

type Target = str

The resulting type after dereferencing.
source§

fn deref(&self) -> &str

Dereferences the value.
source§

impl Display for NormalizedOutput

source§

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

Formats the value using the given formatter. Read more
source§

impl From<String> for NormalizedOutput

source§

fn from(s: String) -> Self

Converts to this type from the input type.
source§

impl Hash for NormalizedOutput

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

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

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for NormalizedOutput

source§

fn cmp(&self, other: &NormalizedOutput) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for NormalizedOutput

source§

fn eq(&self, other: &NormalizedOutput) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for NormalizedOutput

source§

fn partial_cmp(&self, other: &NormalizedOutput) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Eq for NormalizedOutput

source§

impl StructuralPartialEq for NormalizedOutput