pub struct TestsAnalyzer;Expand description
TestsAnalyzer — enforces the lying_test rule (heuristic).
A test that names a negative assertion (contains “cannot”, “rejects”,
“forbidden”, “returns_error”, “fails”, …) but has a body that only makes
positive assertions (plain assert!(x) on an is_ok()-ish expression, or
no assertions at all) is almost certainly lying. The heuristic is
intentionally conservative and only fires when intent and assertion
plainly disagree.
Trait Implementations§
Source§impl Default for TestsAnalyzer
impl Default for TestsAnalyzer
Source§fn default() -> TestsAnalyzer
fn default() -> TestsAnalyzer
Returns the “default value” for a type. Read more
Source§impl DriftAnalyzer for TestsAnalyzer
impl DriftAnalyzer for TestsAnalyzer
fn analyze(&self, ctx: &ProjectContext) -> Vec<Divergence>
Auto Trait Implementations§
impl Freeze for TestsAnalyzer
impl RefUnwindSafe for TestsAnalyzer
impl Send for TestsAnalyzer
impl Sync for TestsAnalyzer
impl Unpin for TestsAnalyzer
impl UnsafeUnpin for TestsAnalyzer
impl UnwindSafe for TestsAnalyzer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more