kubo/cmd/ipfs/main_test.go
2014-11-18 06:15:00 -08:00

18 lines
358 B
Go

package main
import (
"testing"
"github.com/jbenet/go-ipfs/commands"
)
func TestIsCientErr(t *testing.T) {
t.Log("Catch both pointers and values")
if !isClientError(commands.Error{Code: commands.ErrClient}) {
t.Errorf("misidentified value")
}
if !isClientError(&commands.Error{Code: commands.ErrClient}) {
t.Errorf("misidentified pointer")
}
}