1
Fork 0

Make ui test that are run-pass and do not test the compiler itself library tests

This commit is contained in:
Christiaan Dirkx 2020-11-22 09:08:04 +01:00
parent 349b3b324d
commit be554c4101
38 changed files with 812 additions and 820 deletions

View file

@ -0,0 +1,16 @@
use std::sync::{Arc, Mutex};
use std::thread;
use std::time::Duration;
#[test]
#[cfg_attr(target_os = "emscripten", ignore)]
fn sleep() {
let finished = Arc::new(Mutex::new(false));
let t_finished = finished.clone();
thread::spawn(move || {
thread::sleep(Duration::new(u64::MAX, 0));
*t_finished.lock().unwrap() = true;
});
thread::sleep(Duration::from_millis(100));
assert_eq!(*finished.lock().unwrap(), false);
}