debugger: Add support for running test methods with function receiver in Go (#34613)
 Closes #33759 Release Notes: - debugger: Add support for running test methods with function receiver in Go Signed-off-by: Umesh Yadav <git@umesh.dev>
This commit is contained in:
parent
b94649ce1e
commit
b4dc7f8a8a
1 changed files with 14 additions and 2 deletions
|
@ -1,9 +1,21 @@
|
|||
; Functions names start with `Test`
|
||||
(
|
||||
(
|
||||
[
|
||||
(function_declaration name: (_) @run
|
||||
(#match? @run "^Test.*"))
|
||||
) @_
|
||||
(method_declaration
|
||||
receiver: (parameter_list
|
||||
(parameter_declaration
|
||||
name: (identifier) @_receiver_name
|
||||
type: [
|
||||
(pointer_type (type_identifier) @_receiver_type)
|
||||
(type_identifier) @_receiver_type
|
||||
]
|
||||
)
|
||||
)
|
||||
name: (field_identifier) @run @_method_name
|
||||
(#match? @_method_name "^Test.*"))
|
||||
] @_
|
||||
(#set! tag go-test)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue