MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / main

Function main

debugger/tests/function_name.rs:12–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11#[tokio::test]
12async fn main() -> Result<()> {
13 let testcase = "fn_name";
14 let (producer, consumer) = setup(testcase).await?;
15
16 let debugger_params = debugger_params_from_file(testcase);
17
18 // println!("{:#?}", debugger_params.breakpoints);
19
20 assert_eq!(
21 debugger_params.breakpoints[0],
22 Breakpoint {
23 id: 0,
24 file_id: 0,
25 loc: LineColumn {
26 line: 0,
27 column: None,
28 },
29 loc_end: None,
30 breakpoint_type: BreakpointType::Breakpoint,
31 capture: VariableCapture::None,
32 }
33 );
34 assert_eq!(
35 debugger_params.breakpoints[1],
36 Breakpoint {
37 id: 1,
38 file_id: 1,
39 loc: LineColumn {
40 line: 12,
41 column: Some(71),
42 },
43 loc_end: Some(LineColumn {
44 line: 13,
45 column: Some(13)
46 }),
47 breakpoint_type: BreakpointType::FunctionCall {
48 fn_name: "display".into(),
49 },
50 capture: VariableCapture::Arguments,
51 }
52 );
53 assert_eq!(
54 debugger_params.breakpoints[2],
55 Breakpoint {
56 id: 2,
57 file_id: 1,
58 loc: LineColumn {
59 line: 18,
60 column: Some(67),
61 },
62 loc_end: Some(LineColumn {
63 line: 19,
64 column: Some(13)
65 }),
66 breakpoint_type: BreakpointType::FunctionCall {
67 fn_name: "fmt".into(),
68 },
69 capture: VariableCapture::Arguments,

Callers

nothing calls this directly

Calls 6

setupFunction · 0.85
into_bytesMethod · 0.80
nextMethod · 0.80
runFunction · 0.50
endMethod · 0.45

Tested by

no test coverage detected