(t *testing.T)
| 89 | } |
| 90 | |
| 91 | func TestPublish(t *testing.T) { |
| 92 | bus := New() |
| 93 | bus.Subscribe("/event/test", func(a int, b int) { |
| 94 | if a != b { |
| 95 | t.Fail() |
| 96 | } |
| 97 | }) |
| 98 | bus.Publish("/event/test", 10, 10) |
| 99 | } |
| 100 | |
| 101 | func TestSubcribeOnceAsync(t *testing.T) { |
| 102 | results := make([]int, 0) |