summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/lib/pq/copy_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/lib/pq/copy_test.go')
-rw-r--r--vendor/github.com/lib/pq/copy_test.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/vendor/github.com/lib/pq/copy_test.go b/vendor/github.com/lib/pq/copy_test.go
index 86745b38f..c1a3cd7fa 100644
--- a/vendor/github.com/lib/pq/copy_test.go
+++ b/vendor/github.com/lib/pq/copy_test.go
@@ -9,8 +9,7 @@ import (
)
func TestCopyInStmt(t *testing.T) {
- var stmt string
- stmt = CopyIn("table name")
+ stmt := CopyIn("table name")
if stmt != `COPY "table name" () FROM STDIN` {
t.Fatal(stmt)
}
@@ -27,8 +26,7 @@ func TestCopyInStmt(t *testing.T) {
}
func TestCopyInSchemaStmt(t *testing.T) {
- var stmt string
- stmt = CopyInSchema("schema name", "table name")
+ stmt := CopyInSchema("schema name", "table name")
if stmt != `COPY "schema name"."table name" () FROM STDIN` {
t.Fatal(stmt)
}
@@ -226,7 +224,7 @@ func TestCopyInTypes(t *testing.T) {
if text != "Héllö\n ☃!\r\t\\" {
t.Fatal("unexpected result", text)
}
- if bytes.Compare(blob, []byte{0, 255, 9, 10, 13}) != 0 {
+ if !bytes.Equal(blob, []byte{0, 255, 9, 10, 13}) {
t.Fatal("unexpected result", blob)
}
if nothing.Valid {