MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / test_main_thread_different

Function test_main_thread_different

rust/tests/main_thread.rs:12–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11#[test]
12fn test_main_thread_different() {
13 let _session = Session::new().expect("Failed to initialize session");
14 let calling_thread = std::thread::current();
15 binaryninja::main_thread::execute_on_main_thread_and_wait(move || {
16 let main_thread = std::thread::current();
17 assert_ne!(
18 calling_thread.id(),
19 main_thread.id(),
20 "Expected calling thread to be the different from the main thread"
21 )
22 });
23}

Callers

nothing calls this directly

Calls 2

currentFunction · 0.50

Tested by

no test coverage detected