Struct move_unit_test::UnitTestingConfig
source · pub struct UnitTestingConfig {
pub instruction_execution_bound: u64,
pub filter: Option<String>,
pub list: bool,
pub num_threads: usize,
pub dep_files: Vec<String>,
pub report_statistics: bool,
pub report_storage_on_error: bool,
pub named_address_values: Vec<(String, AddressBytes)>,
pub source_files: Vec<String>,
pub check_stackless_vm: bool,
pub verbose: bool,
}Fields§
§instruction_execution_bound: u64Bound the number of instructions that can be executed by any one test.
filter: Option<String>A filter string to determine which unit tests to run
list: boolList all tests
num_threads: usizeNumber of threads to use for running tests.
dep_files: Vec<String>Dependency files
report_statistics: boolReport test statistics at the end of testing
report_storage_on_error: boolShow the storage state at the end of execution of a failing test
named_address_values: Vec<(String, AddressBytes)>Named address mapping
source_files: Vec<String>Source files
check_stackless_vm: boolUse the stackless bytecode interpreter to run the tests and cross check its results with the execution result from Move VM.
verbose: boolVerbose mode
Implementations§
source§impl UnitTestingConfig
impl UnitTestingConfig
sourcepub fn default_with_bound(bound: Option<u64>) -> Self
pub fn default_with_bound(bound: Option<u64>) -> Self
Create a unit testing config for use with register_move_unit_tests
pub fn with_named_addresses( self, named_address_values: BTreeMap<String, AddressBytes> ) -> Self
sourcepub fn build_test_plan(&self) -> Option<TestPlan>
pub fn build_test_plan(&self) -> Option<TestPlan>
Build a test plan from a unit test config
Trait Implementations§
source§impl Clone for UnitTestingConfig
impl Clone for UnitTestingConfig
source§fn clone(&self) -> UnitTestingConfig
fn clone(&self) -> UnitTestingConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for UnitTestingConfig
impl Debug for UnitTestingConfig
source§impl StructOpt for UnitTestingConfig
impl StructOpt for UnitTestingConfig
source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Builds the struct from
clap::ArgMatches. It’s guaranteed to succeed
if matches originates from an App generated by [StructOpt::clap] called on
the same type, otherwise it must panic.§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os).
Calls clap::Error::exit on failure, printing the error message and aborting the program.§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os).
Unlike [StructOpt::from_args], returns clap::Error on failure instead of aborting the program,
so calling .exit is up to you.§fn from_iter<I>(iter: I) -> Selfwhere
Self: Sized,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter<I>(iter: I) -> Selfwhere Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Gets the struct from any iterator such as a
Vec of your making.
Print the error message and quit the program in case of failure. Read more§fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where
Self: Sized,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Gets the struct from any iterator such as a
Vec of your making. Read more