Lines Matching refs:self

15     def setUp(self):  argument
17 TestBase.setUp(self)
19 self.line_break_global_scope = line_number(
21 self.line_break_file_scope = line_number('ns2.cpp', '// BP_file_scope')
22 self.line_break_ns_scope = line_number('ns2.cpp', '// BP_ns_scope')
23 self.line_break_nested_ns_scope = line_number(
25 self.line_break_nested_ns_scope_after_using = line_number(
27 self.line_break_before_using_directive = line_number(
29 self.line_break_after_using_directive = line_number(
32 def runToBkpt(self, command): argument
33 self.runCmd(command, RUN_SUCCEEDED)
35 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
40 def test_scope_lookup_with_run_command(self): argument
42 self.build()
43 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
46 self,
48 self.line_break_global_scope,
52 self,
54 self.line_break_ns_scope,
58 self,
60 self.line_break_nested_ns_scope,
64 self,
66 self.line_break_nested_ns_scope_after_using,
70 self,
72 self.line_break_before_using_directive,
76 self,
78 self.line_break_after_using_directive,
83 self.runToBkpt("run")
85 self.expect("expr -- func()", startstr="(int) $0 = 1")
87 self.expect("expr -- A::B::func()", startstr="(int) $1 = 4")
89 self.expect("expr -- func(10)", startstr="(int) $2 = 11")
91 self.expect("expr -- ::func()", startstr="(int) $3 = 1")
93 self.expect("expr -- A::foo()", startstr="(int) $4 = 42")
96 self.runToBkpt("continue")
98 self.expect("expr -- func(10)", startstr="(int) $5 = 13")
100 self.expect("expr -- B::func()", startstr="(int) $6 = 4")
102 self.expect("expr -- func()", startstr="(int) $7 = 3")
105 self.runToBkpt("continue")
107 self.expect("expr -- func()", startstr="(int) $8 = 4")
109 self.expect("expr -- A::func()", startstr="(int) $9 = 3")
116 self.expect("expr -- func(10)", startstr="(int) $10 = 13")
120 self.runToBkpt("continue")
122 self.expect("expr -- A::func(10)", startstr="(int) $11 = 13")
126 self.runToBkpt("continue")
128 self.expect("expr -- ::func()", startstr="(int) $12 = 1")
130 self.expect("expr -- B::func()", startstr="(int) $13 = 4")
134 self.runToBkpt("continue")
136 self.expect("expr -- ::func()", startstr="(int) $14 = 1")
138 self.expect("expr -- B::func()", startstr="(int) $15 = 4")
141 def test_function_scope_lookup_with_run_command(self): argument
143 self.build()
144 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
147 self,
149 self.line_break_global_scope,
153 self,
155 self.line_break_ns_scope,
160 self.runToBkpt("run")
164 self.expect("expr -- foo()", startstr="(int) $0 = 42")
168 self.expect("expr -- ::foo()", startstr="(int) $1 = 42")
171 self.runToBkpt("continue")
175 self.expect("expr -- foo()", startstr="(int) $2 = 42")
179 def test_file_scope_lookup_with_run_command(self): argument
181 self.build()
182 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
185 self,
187 self.line_break_file_scope,
192 self.runToBkpt("run")
196 self.expect("expr -- func()", startstr="(int) $0 = 2")
199 def test_scope_lookup_before_using_with_run_command(self): argument
201 self.build()
202 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
205 self,
207 self.line_break_before_using_directive,
213 self.runToBkpt("run")
215 self.expect("expr -- func()", startstr="(int) $0 = 1")
223 def test_scope_after_using_directive_lookup_with_run_command(self): argument
225 self.build()
226 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
229 self,
231 self.line_break_after_using_directive,
237 self.runToBkpt("run")
239 self.expect("expr -- func2()", startstr="(int) $0 = 3")
245 def test_scope_after_using_declaration_lookup_with_run_command(self): argument
247 self.build()
248 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
251 self,
253 self.line_break_nested_ns_scope_after_using,
259 self.runToBkpt("run")
261 self.expect("expr -- func()", startstr="(int) $0 = 3")
264 def test_scope_ambiguity_after_using_lookup_with_run_command(self): argument
266 self.build()
267 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
270 self,
272 self.line_break_after_using_directive,
278 self.runToBkpt("run")
282 self.expect("expr -- func()", startstr="error")
284 def test_scope_lookup_shadowed_by_using_with_run_command(self): argument
286 self.build()
287 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
290 self,
292 self.line_break_nested_ns_scope,
297 self.runToBkpt("run")
303 self.expect("expr -- func(10)", startstr="(int) $0 = 13")