pub struct SmokeModuleTest<'a> {
    pub dependency_name: &'a str,
    pub version: &'a str,
    pub local_path_clause: &'a str,
    pub code: String,
    pub test_path: PathBuf,
    pub test_postfix: &'a str,
}
Expand description

Context for smoke testing of a module.

Fields§

§dependency_name: &'a str

Name of module.

§version: &'a str

Version of module.

§local_path_clause: &'a str

Local path to the module.

§code: String

Code to run during smoke testing.

§test_path: PathBuf

Path to temp directory to put all files.

§test_postfix: &'a str

Postfix to add to name.

Implementations§

source§

impl<'a> SmokeModuleTest<'a>

source

pub fn new(dependency_name: &'a str) -> SmokeModuleTest<'a>

Constructor of a context for smoke testing.

source

pub fn version(&mut self, version: &'a str) -> &mut SmokeModuleTest<'a>

Set version.

source

pub fn local_path_clause( &mut self, local_path_clause: &'a str ) -> &mut SmokeModuleTest<'a>

Set local path.

source

pub fn test_postfix( &mut self, test_postfix: &'a str ) -> &mut SmokeModuleTest<'a>

Set postfix to add to name of test.

source

pub fn code(&mut self, code: String) -> &mut SmokeModuleTest<'a>

Get code.

source

pub fn form(&mut self) -> Result<(), &'static str>

Prepare files at temp dir for smoke testing.

source

pub fn perform(&self) -> Result<(), &'static str>

Do smoke testing.

source

pub fn clean(&self, force: bool) -> Result<(), &'static str>

Cleaning temp directory after testing.

Trait Implementations§

source§

impl<'a> Debug for SmokeModuleTest<'a>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for SmokeModuleTest<'a>

§

impl<'a> Send for SmokeModuleTest<'a>

§

impl<'a> Sync for SmokeModuleTest<'a>

§

impl<'a> Unpin for SmokeModuleTest<'a>

§

impl<'a> UnwindSafe for SmokeModuleTest<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<Target, Original> VectorizedInto<Target> for Originalwhere Target: VectorizedFrom<Original>,

source§

fn vectorized_into(self) -> Target

Performs the conversion.