blob: c6cc24abc18c5e93e6f0b92cfd2260c061d1dce3 [file] [log] [blame]
Elie Kheirallahe2bd8502023-03-20 21:19:27 +00001use libtest_mimic::{Trial, Arguments};
2
3
4#[test]
5fn check_test_on_main_thread() {
6 let outer_thread = std::thread::current().id();
7
8 let mut args = Arguments::default();
9 args.test_threads = Some(1);
10 let conclusion = libtest_mimic::run(&args, vec![Trial::test("check", move || {
11 assert_eq!(outer_thread, std::thread::current().id());
12 Ok(())
13 })]);
14
15 assert_eq!(conclusion.num_passed, 1);
16}