summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/garyburd/redigo/redis/reply_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/garyburd/redigo/redis/reply_test.go')
-rw-r--r--Godeps/_workspace/src/github.com/garyburd/redigo/redis/reply_test.go27
1 files changed, 20 insertions, 7 deletions
diff --git a/Godeps/_workspace/src/github.com/garyburd/redigo/redis/reply_test.go b/Godeps/_workspace/src/github.com/garyburd/redigo/redis/reply_test.go
index 92744c590..2c774866d 100644
--- a/Godeps/_workspace/src/github.com/garyburd/redigo/redis/reply_test.go
+++ b/Godeps/_workspace/src/github.com/garyburd/redigo/redis/reply_test.go
@@ -19,7 +19,6 @@ import (
"reflect"
"testing"
- "github.com/garyburd/redigo/internal/redistest"
"github.com/garyburd/redigo/redis"
)
@@ -58,6 +57,16 @@ var replyTests = []struct {
ve([]string(nil), redis.ErrNil),
},
{
+ "byteslices([v1, v2])",
+ ve(redis.ByteSlices([]interface{}{[]byte("v1"), []byte("v2")}, nil)),
+ ve([][]byte{[]byte("v1"), []byte("v2")}, nil),
+ },
+ {
+ "byteslices(nil)",
+ ve(redis.ByteSlices(nil, nil)),
+ ve([][]byte(nil), redis.ErrNil),
+ },
+ {
"values([v1, v2])",
ve(redis.Values([]interface{}{[]byte("v1"), []byte("v2")}, nil)),
ve([]interface{}{[]byte("v1"), []byte("v2")}, nil),
@@ -101,15 +110,16 @@ func TestReply(t *testing.T) {
}
}
-// dial wraps DialTestDB() with a more suitable function name for examples.
+// dial wraps DialDefaultServer() with a more suitable function name for examples.
func dial() (redis.Conn, error) {
- return redistest.Dial()
+ return redis.DialDefaultServer()
}
func ExampleBool() {
c, err := dial()
if err != nil {
- panic(err)
+ fmt.Println(err)
+ return
}
defer c.Close()
@@ -123,7 +133,8 @@ func ExampleBool() {
func ExampleInt() {
c, err := dial()
if err != nil {
- panic(err)
+ fmt.Println(err)
+ return
}
defer c.Close()
@@ -140,7 +151,8 @@ func ExampleInt() {
func ExampleInts() {
c, err := dial()
if err != nil {
- panic(err)
+ fmt.Println(err)
+ return
}
defer c.Close()
@@ -154,7 +166,8 @@ func ExampleInts() {
func ExampleString() {
c, err := dial()
if err != nil {
- panic(err)
+ fmt.Println(err)
+ return
}
defer c.Close()