pub enum TestBehavior {
RoundTrip {
json: Value,
assertions: Vec<(String, Value)>,
},
Construction {
fields: Vec<(String, FieldValue)>,
assertions: Vec<ConstructionAssertion>,
},
CompileOnly,
EnumMatch {
json: Value,
expected_variant: String,
variant_assertions: Vec<(String, Value)>,
},
}Expand description
Different test behaviors we can generate
Variants§
RoundTrip
Test serialization/deserialization round trip
Fields
Construction
Test creating an instance with specific values
Fields
§
fields: Vec<(String, FieldValue)>Field values to set (field_name -> value_expr) Value expressions are simple literals or enum variants
§
assertions: Vec<ConstructionAssertion>Assertions to make on the created instance
CompileOnly
Test that a type exists and compiles
EnumMatch
Test enum variant matching
Trait Implementations§
Source§impl Clone for TestBehavior
impl Clone for TestBehavior
Source§fn clone(&self) -> TestBehavior
fn clone(&self) -> TestBehavior
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for TestBehavior
impl RefUnwindSafe for TestBehavior
impl Send for TestBehavior
impl Sync for TestBehavior
impl Unpin for TestBehavior
impl UnwindSafe for TestBehavior
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more