Skip to content

Commit 332fb7e

Browse files
committed
Move std::thread_local unit tests to integration tests
1 parent 4ce917d commit 332fb7e

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

Diff for: library/std/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ harness = false
134134
name = "floats"
135135
path = "tests/floats/lib.rs"
136136

137+
[[test]]
138+
name = "thread_local"
139+
path = "tests/thread_local/lib.rs"
140+
137141
[[bench]]
138142
name = "stdbenches"
139143
path = "benches/lib.rs"

Diff for: library/std/src/thread/local.rs

-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
33
#![unstable(feature = "thread_local_internals", issue = "none")]
44

5-
#[cfg(all(test, not(any(target_os = "emscripten", target_os = "wasi"))))]
6-
mod tests;
7-
8-
#[cfg(test)]
9-
mod dynamic_tests;
10-
115
use crate::cell::{Cell, RefCell};
126
use crate::error::Error;
137
use crate::fmt;

Diff for: library/std/src/thread/local/dynamic_tests.rs renamed to library/std/tests/thread_local/dynamic_tests.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use crate::cell::RefCell;
2-
use crate::collections::HashMap;
3-
use crate::thread_local;
1+
use std::cell::RefCell;
2+
use std::collections::HashMap;
3+
use std::thread_local;
44

55
#[test]
66
fn smoke() {

Diff for: library/std/tests/thread_local/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#[cfg(not(any(target_os = "emscripten", target_os = "wasi")))]
2+
mod tests;
3+
4+
mod dynamic_tests;

Diff for: library/std/src/thread/local/tests.rs renamed to library/std/tests/thread_local/tests.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use crate::cell::{Cell, UnsafeCell};
2-
use crate::sync::atomic::{AtomicU8, Ordering};
3-
use crate::sync::{Arc, Condvar, Mutex};
4-
use crate::thread::{self, Builder, LocalKey};
5-
use crate::thread_local;
1+
use std::cell::{Cell, UnsafeCell};
2+
use std::sync::atomic::{AtomicU8, Ordering};
3+
use std::sync::{Arc, Condvar, Mutex};
4+
use std::thread::{self, Builder, LocalKey};
5+
use std::thread_local;
66

77
#[derive(Clone, Default)]
88
struct Signal(Arc<(Mutex<bool>, Condvar)>);

0 commit comments

Comments
 (0)