Enum retest::DiffKind[][src]

pub enum DiffKind {
    No,
    Binary,
    Image,
    Json,
    Text,
    Custom(PathBuf),
}
Expand description

The kind of comparison to do when retesting.

Retest will work this out for itself unless you override it.

For files with no suffix it assumes DiffKind::Binary, and for files with suffix .jsn or .json it assumes DiffKind::Json (and compares the JSON data, ignoring irrelevant whitespace). For common image formats it assumes DiffKind::Image and compares pixel for pixel; otherwise it assumes DiffKind::Text and compares text (but ignores line-endings).

You can force the kind of comparison to use by setting the DiffKind.

Or you can force retest to use an external tool by using DiffKind::custom(Path) giving it the tool’s name.

Or you can force retest not to compare output (i.e., if you only want to check the exit status/error level), by setting DiffKind::No.

The DiffKind is set per-test using the DIFF entry in retest plan files (.rt), or using the Test::diff() method.

Variants

No

Binary

Image

Json

Text

Custom(PathBuf)

Tuple Fields

Implementations

Returns a DiffKind::Custom with the given external tool.

For example, on Unix: DiffKind::custom("diff").

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.