()
| 11 | |
| 12 | #[tokio::test] |
| 13 | async fn main() -> Result<()> { |
| 14 | let testcase = "fn_return"; |
| 15 | |
| 16 | // this is the only way llvm would generate multiple return instructions |
| 17 | rustc_optimize(&format!("testcases/{testcase}")); |
| 18 | |
| 19 | let debugger_params = DebuggerParams { |
| 20 | binary: format!("testcases/{testcase}.o"), |
| 21 | files: vec![ |
| 22 | Default::default(), |
| 23 | SourceFile { |
| 24 | id: 1, |
| 25 | path: format!("testcases/{testcase}.rs"), |
| 26 | crate_name: testcase.into(), |
| 27 | modified: SystemTime::UNIX_EPOCH, |
| 28 | }, |
| 29 | ], |
| 30 | breakpoints: vec![ |
| 31 | Default::default(), |
| 32 | Breakpoint { |
| 33 | id: 1, |
| 34 | file_id: 1, |
| 35 | loc: LineColumn { |
| 36 | line: 27, |
| 37 | column: None, |
| 38 | }, |
| 39 | loc_end: None, |
| 40 | breakpoint_type: BreakpointType::FunctionCall { |
| 41 | fn_name: "main".into(), |
| 42 | }, |
| 43 | capture: VariableCapture::Arguments, |
| 44 | }, |
| 45 | Breakpoint { |
| 46 | id: 2, |
| 47 | file_id: 1, |
| 48 | loc: LineColumn { |
| 49 | line: 2, |
| 50 | column: None, |
| 51 | }, |
| 52 | loc_end: None, |
| 53 | breakpoint_type: BreakpointType::FunctionCall { |
| 54 | fn_name: "multi_return".into(), |
| 55 | }, |
| 56 | capture: VariableCapture::Arguments, |
| 57 | }, |
| 58 | ], |
| 59 | arguments: vec![], |
| 60 | }; |
| 61 | |
| 62 | let (producer, consumer) = setup(testcase).await?; |
| 63 | |
| 64 | Debugger::run(debugger_params, producer.clone()); |
| 65 | |
| 66 | producer.end().await?; |
| 67 | |
| 68 | let expected = vec![ |
| 69 | Expected::FnCall { |
| 70 | name: "main".into(), |
nothing calls this directly
no test coverage detected