Index: packages/Python/lldbsuite/test/lang/cpp/namespace_lit/breakpoints_func_auto.test =================================================================== --- /dev/null +++ packages/Python/lldbsuite/test/lang/cpp/namespace_lit/breakpoints_func_auto.test @@ -0,0 +1,18 @@ +; int func() { return 42; } +; int func(int N) { return 42 + N; } +; namespace A { +; int func(int N) { return N + 3; } +; int func() { return 42; } +; namespace B { +; int func() { return 4; } +; } +; } +; +; void LIT_RUN_TEST() { +; #break_by_name("func") +; #ensure_breakpoint("func()") +; #ensure_breakpoint("func(int)") +; #ensure_breakpoint("A::func()") +; #ensure_breakpoint("A::func(int)") +; #ensure_breakpoint("A::B::func()") +; } Index: packages/Python/lldbsuite/test/lang/cpp/namespace_lit/scope_lookup_with_run_cmd.test =================================================================== --- /dev/null +++ packages/Python/lldbsuite/test/lang/cpp/namespace_lit/scope_lookup_with_run_cmd.test @@ -0,0 +1,63 @@ +; int func() { return 42; } +; namespace A { +; int func(int N) { return N + 3; } +; int func2() { return 42; } +; namespace B { +; int func() { return 4; } +; } +; } +; +; void exec() { +; #breakpoint +; #verify("expr -- func()", start="(int) [[%PH%]] = 1") +; #verify("expr -- A::B::func()", start="(int) [[%PH%]] = 4") +; #verify("expr -- func(10)", start="(int) [[%PH%]] = 11") +; #verify("expr -- ::func()", start="(int) [[%PH%]] = 1") +; #verify("expr -- A::foo()", start="(int) [[%PH%]] = 42") +; #continue +; } +; namespace A { +; void exec() { +; #breakpoint +; #verify("expr -- func(10)", start="(int) [[%PH%]] = 13") +; #verify("expr -- B::func()", start="(int) [[%PH%]] = 4") +; #verify("expr -- func()", start="(int) [[%PH%]] = 3") +; #continue +; } +; namespace B { +; void exec() { +; #breakpoint +; #verify("expr -- func()", start="(int) $8 = 4") +; #verify("expr -- A::func()", start="(int) $9 = 3") +; #verify("expr -- func(10)", start="(int) $10 = 13") +; #continue +; } +; void exec2() { +; using A::func; +; #breakpoint +; #verify("expr -- A::func(10)", start="(int) $11 = 13") +; #continue +; } +; } +; } +; void exec_before_using() { +; #breakpoint +; #verify("expr -- ::func()", start="(int) $12 = 1") +; #verify("expr -- B::func()", start="(int) $13 = 4") +; #continue +; } +; void exec_after_using() { +; #breakpoint +; #verify("expr -- ::func()", start="(int) $14 = 1") +; #verify("expr -- B::func()", start="(int) $15 = 4") +; #continue +; } +; +; void LIT_RUN_TEST() { +; exec(); +; A::exec(); +; A::B::exec(); +; A::B::exec2(); +; exec_before_using(); +; exec_after_using(); +; }