File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package stack
22
33import (
44 "testing"
5+ "time"
56
67 "github.com/stretchr/testify/require"
78)
@@ -22,6 +23,15 @@ func (e *starType) starredCall() string {
2223 return FunctionID ("" ).FunctionID ()
2324}
2425
26+ func anonymousFunctionCall () string {
27+ var result string
28+ go func () {
29+ result = FunctionID ("" ).FunctionID ()
30+ }()
31+ time .Sleep (time .Second )
32+ return result
33+ }
34+
2535func TestFunctionIDForGenericType (t * testing.T ) {
2636 t .Run ("StaticFunc" , func (t * testing.T ) {
2737 require .Equal (t ,
@@ -42,4 +52,10 @@ func TestFunctionIDForGenericType(t *testing.T) {
4252 x .starredCall (),
4353 )
4454 })
55+ t .Run ("AnonymousFunctionCall" , func (t * testing.T ) {
56+ require .Equal (t ,
57+ "github.com/ydb-platform/ydb-go-sdk/v3/internal/stack.anonymousFunctionCall" ,
58+ anonymousFunctionCall (),
59+ )
60+ })
4561}
You can’t perform that action at this time.
0 commit comments