diff options
| author | Michael Neumann <mneumann@ntecs.de> | 2016-01-12 21:02:06 +0100 |
|---|---|---|
| committer | Michael Neumann <mneumann@ntecs.de> | 2016-01-12 21:02:06 +0100 |
| commit | ca76cf120bec1b700df967cda5a2d3f4cd323cb6 (patch) | |
| tree | db58d6b25c0d419ef28e240ed5d98ed890e38145 /src/test | |
| parent | d485a511d011aca349c7cda97775392981bf5d5f (diff) | |
| download | rust-ca76cf120bec1b700df967cda5a2d3f4cd323cb6.tar.gz rust-ca76cf120bec1b700df967cda5a2d3f4cd323cb6.zip | |
Add test case for #[thread_local] on extern statics
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/auxiliary/thread-local-extern-static.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/thread-local-extern-static.rs | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/test/auxiliary/thread-local-extern-static.rs b/src/test/auxiliary/thread-local-extern-static.rs new file mode 100644 index 00000000000..7a64b32e72a --- /dev/null +++ b/src/test/auxiliary/thread-local-extern-static.rs @@ -0,0 +1,2 @@ +#[thread_local] +pub static FOO: u32 = 3; diff --git a/src/test/run-pass/thread-local-extern-static.rs b/src/test/run-pass/thread-local-extern-static.rs new file mode 100644 index 00000000000..f6f323534b6 --- /dev/null +++ b/src/test/run-pass/thread-local-extern-static.rs @@ -0,0 +1,10 @@ +extern crate thread_local_extern_static; + +extern { + #[thread_local] + static FOO: u32; +} + +fn main() { + assert_eq!(FOO, 3); +} |
