X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=vendor%2Fgithub.com%2Fhashicorp%2Fyamux%2Futil_test.go;fp=vendor%2Fgithub.com%2Fhashicorp%2Fyamux%2Futil_test.go;h=0000000000000000000000000000000000000000;hp=dd14623af7da16bf97fee1c81e672710ac1cd449;hb=54373c1a3efe0e373ec1605840a4363e4b246c46;hpb=ee01d543fdfe1fd0a4d548965c66f7923ea7b062 diff --git a/vendor/github.com/hashicorp/yamux/util_test.go b/vendor/github.com/hashicorp/yamux/util_test.go deleted file mode 100644 index dd14623a..00000000 --- a/vendor/github.com/hashicorp/yamux/util_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package yamux - -import ( - "testing" -) - -func TestAsyncSendErr(t *testing.T) { - ch := make(chan error) - asyncSendErr(ch, ErrTimeout) - select { - case <-ch: - t.Fatalf("should not get") - default: - } - - ch = make(chan error, 1) - asyncSendErr(ch, ErrTimeout) - select { - case <-ch: - default: - t.Fatalf("should get") - } -} - -func TestAsyncNotify(t *testing.T) { - ch := make(chan struct{}) - asyncNotify(ch) - select { - case <-ch: - t.Fatalf("should not get") - default: - } - - ch = make(chan struct{}, 1) - asyncNotify(ch) - select { - case <-ch: - default: - t.Fatalf("should get") - } -} - -func TestMin(t *testing.T) { - if min(1, 2) != 1 { - t.Fatalf("bad") - } - if min(2, 1) != 1 { - t.Fatalf("bad") - } -}