Skip to content

Panic in assert.TestNotEqual on assert.ObjectsAreEqual for []uint8 #125

@willfaught

Description

@willfaught
$ go version
go version go1.4.1 darwin/amd64

$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Will"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.4.1/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.4.1/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"

$ go test .
--- FAIL: TestNotEqual (0.00s)
panic: runtime error: comparing uncomparable type []uint8 [recovered]
    panic: runtime error: comparing uncomparable type []uint8

goroutine 14 [running]:
testing.func·006()
    /usr/local/Cellar/go/1.4.1/libexec/src/testing/testing.go:441 +0x181
github.com/willfaught/testify/assert.ObjectsAreEqual(0x25e3a0, 0xc20801ea60, 0x25e3a0, 0xc20801ea80, 0x18)
    /Users/Will/src/github.com/willfaught/testify/assert/assertions.go:43 +0x258
github.com/willfaught/testify/assert.NotEqual(0x57c018, 0xc208086630, 0x25e3a0, 0xc20801ea60, 0x25e3a0, 0xc20801ea80, 0x0, 0x0, 0x0, 0x32d501)
    /Users/Will/src/github.com/willfaught/testify/assert/assertions.go:429 +0x46
github.com/willfaught/testify/assert.TestNotEqual(0xc2080865a0)
    /Users/Will/src/github.com/willfaught/testify/assert/assertions_test.go:193 +0x7f8
testing.tRunner(0xc2080865a0, 0x4c40b8)
    /usr/local/Cellar/go/1.4.1/libexec/src/testing/testing.go:447 +0xbf
created by testing.RunTests
    /usr/local/Cellar/go/1.4.1/libexec/src/testing/testing.go:555 +0xa8b

goroutine 1 [chan receive]:
testing.RunTests(0x3cecc8, 0x4c3fe0, 0x3c, 0x3c, 0x1b501)
    /usr/local/Cellar/go/1.4.1/libexec/src/testing/testing.go:556 +0xad6
testing.(*M).Run(0xc20802e2d0, 0x4ce2a0)
    /usr/local/Cellar/go/1.4.1/libexec/src/testing/testing.go:485 +0x6c
main.main()
    github.com/willfaught/testify/assert/_test/_testmain.go:170 +0x1d5
FAIL    github.com/willfaught/testify/assert    0.006s

Line 43 of assert/assertions.go is:

if actual == expectedValue.Convert(actualType).Interface() {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions