Commit Graph

8 Commits

Author SHA1 Message Date
EFanZh
ba42380142 Implement non-poisoning Mutex::with_mut, RwLock::with and RwLock::with_mut
ACP: https://github.com/rust-lang/libs-team/issues/497.
2025-10-04 17:16:00 +08:00
Connor Tsui
18d0dcbc8e fix config for poison macro test
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-09-11 12:35:26 -04:00
Connor Tsui
ad499d076a add nonpoison and poison rwlock tests
Adds tests for the `nonpoison::RwLock` variant by using a macro to
duplicate the existing `poison` tests.

Note that all of the tests here are adapted from the existing `poison`
tests.
2025-08-09 08:41:27 +02:00
Connor Tsui
d8a0df075d reorganize rwlock tests
This commit simply helps discern the actual changes needed to test both
poison and nonpoison `rwlock`s.
2025-08-09 08:41:27 +02:00
Zachary S
d2068be4a0 Rename (Mapped)(RwLock|Mutex)Guard::try_map to filter_map.
1. analogous to std::cell::Ref(Mut)::filter_map.
2. doesn't imply `Try` genericizability.
2025-04-30 19:43:24 -05:00
Paul Menage
9e5c942286 Mark some std tests as requiring panic = "unwind"
This allows these test modules to pass on builds/targets without
unwinding support, where `panic = "abort"` - the ignored tests are for
functionality that's not supported on those targets.
2025-03-10 08:31:06 -07:00
Eric Huss
b7c975b22e library: Update rand to 0.9.0 2025-02-13 12:20:55 -08:00
bjorn3
b8ae372e48 Move std::sync unit tests to integration tests
This removes two minor OnceLock tests which test private methods. The
rest of the tests should be more than enough to catch mistakes in those
private methods. Also makes ReentrantLock::try_lock public. And finally
it makes the mpmc tests actually run.
2025-01-26 10:28:05 +00:00