Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
|
@ -1,24 +0,0 @@
|
|||
// run-pass
|
||||
// needs-unwind
|
||||
// ignore-emscripten no threads support
|
||||
|
||||
// Make sure the destructor is run for unit-like structs.
|
||||
|
||||
use std::thread;
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl Drop for Foo {
|
||||
fn drop(&mut self) {
|
||||
panic!("This panic should happen.");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
let x = thread::spawn(move|| {
|
||||
let _b = Foo;
|
||||
}).join();
|
||||
|
||||
let s = x.unwrap_err().downcast::<&'static str>().unwrap();
|
||||
assert_eq!(&**s, "This panic should happen.");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue