@@ -20,6 +20,14 @@ var _ = Describe("IgnoringTopFunction matcher", func() {
20
20
Expect (m .Match (Goroutine {
21
21
TopFunction : "main.main" ,
22
22
})).To (BeFalse ())
23
+
24
+ m = IgnoringTopFunction ("foo.bar(*implementation[...]).baz" )
25
+ Expect (m .Match (Goroutine {
26
+ TopFunction : "foo.bar(*implementation[...]).baz" ,
27
+ })).To (BeTrue ())
28
+ Expect (m .Match (Goroutine {
29
+ TopFunction : "main.main" ,
30
+ })).To (BeFalse ())
23
31
})
24
32
25
33
It ("matches a toplevel function by prefix" , func () {
@@ -33,6 +41,17 @@ var _ = Describe("IgnoringTopFunction matcher", func() {
33
41
Expect (m .Match (Goroutine {
34
42
TopFunction : "spanish.inquisition" ,
35
43
})).To (BeFalse ())
44
+
45
+ m = IgnoringTopFunction ("foo.bar(*implementation[...])..." )
46
+ Expect (m .Match (Goroutine {
47
+ TopFunction : "foo.bar(*implementation[...]).baz" ,
48
+ })).To (BeTrue ())
49
+ Expect (m .Match (Goroutine {
50
+ TopFunction : "foo" ,
51
+ })).To (BeFalse ())
52
+ Expect (m .Match (Goroutine {
53
+ TopFunction : "spanish.inquisition" ,
54
+ })).To (BeFalse ())
36
55
})
37
56
38
57
It ("matches a toplevel function by name and state prefix" , func () {
@@ -45,6 +64,16 @@ var _ = Describe("IgnoringTopFunction matcher", func() {
45
64
TopFunction : "foo.bar" ,
46
65
State : "uneasy, anxious" ,
47
66
})).To (BeFalse ())
67
+
68
+ m = IgnoringTopFunction ("foo.bar(*implementation[...]) [worried]" )
69
+ Expect (m .Match (Goroutine {
70
+ TopFunction : "foo.bar(*implementation[...])" ,
71
+ State : "worried, stalled" ,
72
+ })).To (BeTrue ())
73
+ Expect (m .Match (Goroutine {
74
+ TopFunction : "foo.bar(*implementation[...])" ,
75
+ State : "uneasy, anxious" ,
76
+ })).To (BeFalse ())
48
77
})
49
78
50
79
It ("returns failure messages" , func () {
0 commit comments