1
0
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:
Darien Raymond
2019-01-31 20:57:01 +01:00
parent 25f0546228
commit c9958681f7
7 changed files with 81 additions and 53 deletions

View File

@@ -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()
}