mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-31 21:35:42 -05:00
remove dependency on assert lib
This commit is contained in:
@@ -4,12 +4,9 @@ import (
|
||||
"testing"
|
||||
|
||||
. "v2ray.com/core/common/signal/pubsub"
|
||||
. "v2ray.com/ext/assert"
|
||||
)
|
||||
|
||||
func TestPubsub(t *testing.T) {
|
||||
assert := With(t)
|
||||
|
||||
service := NewService()
|
||||
|
||||
sub := service.Subscribe("a")
|
||||
@@ -17,7 +14,9 @@ func TestPubsub(t *testing.T) {
|
||||
|
||||
select {
|
||||
case v := <-sub.Wait():
|
||||
assert(v.(int), Equals, 1)
|
||||
if v != 1 {
|
||||
t.Error("expected subscribed value 1, but got ", v)
|
||||
}
|
||||
default:
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user