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

Function test_background_task_registered

rust/tests/background_task.rs:5–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4#[test]
5fn test_background_task_registered() {
6 let _session = Session::new().expect("Failed to initialize session");
7 let task_progress = "test registered";
8 let task = BackgroundTask::new(task_progress, false);
9 BackgroundTask::running_tasks()
10 .iter()
11 .find(|t| t.progress_text().as_str() == task_progress)
12 .expect("Task not running");
13 task.finish();
14 let still_running = BackgroundTask::running_tasks()
15 .iter()
16 .find(|t| t.progress_text().as_str() == task_progress)
17 .is_some();
18 assert!(!still_running, "Task still running");
19}
20
21#[test]
22fn test_background_task_cancellable() {

Callers

nothing calls this directly

Calls 5

findMethod · 0.80
as_strMethod · 0.80
progress_textMethod · 0.80
iterMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected