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:
@@ -1,9 +1,21 @@
|
|||||||
; Functions names start with `Test`
|
; Functions names start with `Test`
|
||||||
(
|
(
|
||||||
(
|
[
|
||||||
(function_declaration name: (_) @run
|
(function_declaration name: (_) @run
|
||||||
(#match? @run "^Test.*"))
|
(#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)
|
(#set! tag go-test)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user