aboutsummaryrefslogtreecommitdiffstats
path: root/event/event_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'event/event_test.go')
-rw-r--r--event/event_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/event/event_test.go b/event/event_test.go
index 323cfea49..394029301 100644
--- a/event/event_test.go
+++ b/event/event_test.go
@@ -25,6 +25,14 @@ import (
type testEvent int
+func TestSubCloseUnsub(t *testing.T) {
+ // the point of this test is **not** to panic
+ var mux TypeMux
+ mux.Stop()
+ sub := mux.Subscribe(int(0))
+ sub.Unsubscribe()
+}
+
func TestSub(t *testing.T) {
mux := new(TypeMux)
defer mux.Stop()