mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
Move std::thread_local unit tests to integration tests
This commit is contained in:
parent
4ce917dfd5
commit
332fb7e6f1
@ -134,6 +134,10 @@ harness = false
|
|||||||
name = "floats"
|
name = "floats"
|
||||||
path = "tests/floats/lib.rs"
|
path = "tests/floats/lib.rs"
|
||||||
|
|
||||||
|
[[test]]
|
||||||
|
name = "thread_local"
|
||||||
|
path = "tests/thread_local/lib.rs"
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "stdbenches"
|
name = "stdbenches"
|
||||||
path = "benches/lib.rs"
|
path = "benches/lib.rs"
|
||||||
|
@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
#![unstable(feature = "thread_local_internals", issue = "none")]
|
#![unstable(feature = "thread_local_internals", issue = "none")]
|
||||||
|
|
||||||
#[cfg(all(test, not(any(target_os = "emscripten", target_os = "wasi"))))]
|
|
||||||
mod tests;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod dynamic_tests;
|
|
||||||
|
|
||||||
use crate::cell::{Cell, RefCell};
|
use crate::cell::{Cell, RefCell};
|
||||||
use crate::error::Error;
|
use crate::error::Error;
|
||||||
use crate::fmt;
|
use crate::fmt;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use crate::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use crate::thread_local;
|
use std::thread_local;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn smoke() {
|
fn smoke() {
|
4
library/std/tests/thread_local/lib.rs
Normal file
4
library/std/tests/thread_local/lib.rs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#[cfg(not(any(target_os = "emscripten", target_os = "wasi")))]
|
||||||
|
mod tests;
|
||||||
|
|
||||||
|
mod dynamic_tests;
|
@ -1,8 +1,8 @@
|
|||||||
use crate::cell::{Cell, UnsafeCell};
|
use std::cell::{Cell, UnsafeCell};
|
||||||
use crate::sync::atomic::{AtomicU8, Ordering};
|
use std::sync::atomic::{AtomicU8, Ordering};
|
||||||
use crate::sync::{Arc, Condvar, Mutex};
|
use std::sync::{Arc, Condvar, Mutex};
|
||||||
use crate::thread::{self, Builder, LocalKey};
|
use std::thread::{self, Builder, LocalKey};
|
||||||
use crate::thread_local;
|
use std::thread_local;
|
||||||
|
|
||||||
#[derive(Clone, Default)]
|
#[derive(Clone, Default)]
|
||||||
struct Signal(Arc<(Mutex<bool>, Condvar)>);
|
struct Signal(Arc<(Mutex<bool>, Condvar)>);
|
Loading…
Reference in New Issue
Block a user