diff options
| author | Botahamec <botahamec@outlook.com> | 2025-01-12 15:04:01 -0500 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2025-01-12 15:04:01 -0500 |
| commit | 280a61ad7b74019c7aad8b7306a0dd7cfb11359c (patch) | |
| tree | 40d97d4e183c1bc551194944876b099d875f361d /src/rwlock/read_guard.rs | |
| parent | bf95904b3532a9175a7bfa14a3f216abbd15ee98 (diff) | |
More unit tests
Diffstat (limited to 'src/rwlock/read_guard.rs')
| -rw-r--r-- | src/rwlock/read_guard.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rwlock/read_guard.rs b/src/rwlock/read_guard.rs index 8678a8e..2195e44 100644 --- a/src/rwlock/read_guard.rs +++ b/src/rwlock/read_guard.rs @@ -33,12 +33,14 @@ impl<T: Ord + ?Sized, R: RawRwLock> Ord for RwLockReadRef<'_, T, R> { } } +#[mutants::skip] // hashing involves PRNG and is hard to test impl<T: Hash + ?Sized, R: RawRwLock> Hash for RwLockReadRef<'_, T, R> { fn hash<H: std::hash::Hasher>(&self, state: &mut H) { self.deref().hash(state) } } +#[mutants::skip] impl<T: Debug + ?Sized, R: RawRwLock> Debug for RwLockReadRef<'_, T, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) @@ -85,6 +87,7 @@ impl<'a, T: ?Sized, R: RawRwLock> RwLockReadRef<'a, T, R> { } } +#[mutants::skip] // it's hard to get two read guards safely impl<T: PartialEq + ?Sized, R: RawRwLock, Key: Keyable> PartialEq for RwLockReadGuard<'_, '_, T, Key, R> { @@ -93,8 +96,10 @@ impl<T: PartialEq + ?Sized, R: RawRwLock, Key: Keyable> PartialEq } } +#[mutants::skip] // it's hard to get two read guards safely impl<T: Eq + ?Sized, R: RawRwLock, Key: Keyable> Eq for RwLockReadGuard<'_, '_, T, Key, R> {} +#[mutants::skip] // it's hard to get two read guards safely impl<T: PartialOrd + ?Sized, R: RawRwLock, Key: Keyable> PartialOrd for RwLockReadGuard<'_, '_, T, Key, R> { @@ -103,18 +108,21 @@ impl<T: PartialOrd + ?Sized, R: RawRwLock, Key: Keyable> PartialOrd } } +#[mutants::skip] // it's hard to get two read guards safely impl<T: Ord + ?Sized, R: RawRwLock, Key: Keyable> Ord for RwLockReadGuard<'_, '_, T, Key, R> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.deref().cmp(&**other) } } +#[mutants::skip] // hashing involves PRNG and is hard to test impl<T: Hash + ?Sized, R: RawRwLock, Key: Keyable> Hash for RwLockReadGuard<'_, '_, T, Key, R> { fn hash<H: std::hash::Hasher>(&self, state: &mut H) { self.deref().hash(state) } } +#[mutants::skip] impl<T: Debug + ?Sized, Key: Keyable, R: RawRwLock> Debug for RwLockReadGuard<'_, '_, T, Key, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) |
