We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b9b70c commit 69c3830Copy full SHA for 69c3830
src/libcore/tests/atomic.rs
@@ -104,8 +104,10 @@ static S_UINT: AtomicUsize = AtomicUsize::new(0);
104
105
#[test]
106
fn static_init() {
107
- assert!(!S_FALSE.load(SeqCst));
108
- assert!(S_TRUE.load(SeqCst));
109
- assert!(S_INT.load(SeqCst) == 0);
110
- assert!(S_UINT.load(SeqCst) == 0);
+ // Note that we're not really testing the mutability here but it's important
+ // on Android at the moment (#49775)
+ assert!(!S_FALSE.swap(true, SeqCst));
+ assert!(S_TRUE.swap(false, SeqCst));
111
+ assert!(S_INT.fetch_add(1, SeqCst) == 0);
112
+ assert!(S_UINT.fetch_add(1, SeqCst) == 0);
113
}
0 commit comments