fn emit_breakpoints(
        &self,
        test_definition: &TestDefinition,
        phase: &PhaseConfig,
        script: &mut String,
    ) {
        if *phase != PhaseConfig::Live {
            return;
        }

        for bp in &test_definition.breakpoints {
            match self.kind {
                DebuggerKind::Cdb | DebuggerKind::Mock => {
                    writeln!(
                        script,
                        "bp `{}:{}`",
                        test_definition.name.rsplit_once('/').unwrap().1,
                        bp.line_index + 1
                    )
                    .unwrap();
                }
                DebuggerKind::Gdb => {
                    writeln!(
                        script,
                        "break '{}:{}'",
                        test_definition.name.rsplit_once('/').unwrap().1,
                        bp.line_index + 1
                    )
                    .unwrap();
                }
                _ => todo!(),
            }
        }
    }
/// Emit commands for setting breakpoints that have been specified via #break directives
Emit commands for setting breakpoints that have been specified via #break directives
Emit commands for setting breakpoints that have been specified via #break directives
fn emit_breakpoints(
        &self,
        test_definition: &TestDefinition,
        phase: &PhaseConfig,
        script: &mut String,
    ) {
        if *phase != PhaseConfig::Live {
            return;
        }
        for bp in &test_definition.breakpoints {
            match self.kind {
                DebuggerKind::Cdb | DebuggerKind::Mock => {
                    writeln!(
                        script,
                        "bp `{}:{}`",
                        test_definition.name.rsplit_once('/').unwrap().1,
                        bp.line_index + 1
                    )
                    .unwrap();
                }
                DebuggerKind::Gdb => {
                    writeln!(
                        script,
                        "break '{}:{}'",
                        test_definition.name.rsplit_once('/').unwrap().1,
                        bp.line_index + 1
                    )
                    .unwrap();
                }
                _ => todo!(),
            }
        }
    }
fn emit_breakpoints ( & self , test_definition : & TestDefinition , phase : & PhaseConfig , script : & mut String , ) { if * phase != PhaseConfig :: Live { return ; } for bp in & test_definition . breakpoints { match self . kind { DebuggerKind :: Cdb | DebuggerKind :: Mock => { writeln ! ( script " " test_definition name rsplit_once ( '/' ) unwrap ( ) 1 bp line_index 1 ) . unwrap ( ) ; } DebuggerKind :: Gdb => { writeln ! ( script " " test_definition name rsplit_once ( '/' ) unwrap ( ) 1 bp line_index 1 ) . unwrap ( ) ; } _ => todo ! ( ) , } } }
Emit commands for setting breakpoints that have been specified via #break directives
Emit commands for setting breakpoints that have been specified via #break directives
&self
test_definition
&TestDefinition
phase
&PhaseConfig
script
&mut String
&self
test_definition
&TestDefinition
phase
&PhaseConfig
script
&mut String