func eqany(expected, actual interface{}) bool {
	if expected == nil && actual == nil {
		return true
	}
	if expected == nil || actual == nil {
		return false
	}
	et := reflect.TypeOf(expected)
	if et.Kind() == reflect.Slice {
		return eqslice(reflect.ValueOf(expected), reflect.ValueOf(actual))
	} else if et.Kind() == reflect.Map {
		return eqmap(reflect.ValueOf(expected), reflect.ValueOf(actual))
	} else {
		return eqscalar(expected, actual)
	}
}
default equality test and helpers
package testutil
import (
	"bytes"
	"math"
	"reflect"
	"testing"
)
func Ceq(t *testing.T, expected, actual interface{}, eq func(a, b interface{}) bool, context ...interface{}) bool {
	t.Helper()
	e := eq(expected, actual)
	Require(t, e, mergeContext(context, "Expecting %v (%v), got %v (%v)", expected, reflect.TypeOf(expected), actual, reflect.TypeOf(actual))...)
	return e
}
func Cneq(t *testing.T, unexpected, actual interface{}, eq func(a, b interface{}) bool, context ...interface{}) bool {
	t.Helper()
	ne := !eq(unexpected, actual)
	Require(t, ne, mergeContext(context, "Value should not be %v (%v)", unexpected, reflect.TypeOf(unexpected))...)
	return ne
}
func Require(t *testing.T, condition bool, context ...interface{}) {
	t.Helper()
	if !condition {
		if len(context) == 0 {
			t.Fatalf("Assertion failed")
		} else {
			msg := context[0].(string)
			args := make([]interface{}, len(context)-1)
			for i, a := range context[1:] {
				rv := reflect.ValueOf(a)
				if rv.Kind() == reflect.Func {
					a = rv.Call([]reflect.Value{})[0].Interface()
				}
				args[i] = a
			}
			t.Fatalf(msg, args...)
		}
	}
}
func mergeContext(context []interface{}, msg string, msgArgs ...interface{}) []interface{} {
	if len(context) == 0 {
		ret := make([]interface{}, 0, len(msgArgs)+1)
		ret = append(ret, msg)
		ret = append(ret, msgArgs...)
		return ret
	} else {
		ret := make([]interface{}, 0, len(context)+len(msgArgs))
		ret = append(ret, msg+": "+context[0].(string))
		ret = append(ret, msgArgs...)
		ret = append(ret, context[1:]...)
		return ret
	}
}
func Ok(t *testing.T, err error, context ...interface{}) {
	t.Helper()
	Require(t, err == nil, mergeContext(context, "Unexpected error: %s", func() interface{} { return err.Error() })...)
}
func Nok(t *testing.T, err error, context ...interface{}) {
	t.Helper()
	Require(t, err != nil, mergeContext(context, "Expected error but got none")...)
}
func Eq(t *testing.T, expected, actual interface{}, context ...interface{}) bool {
	t.Helper()
	return Ceq(t, expected, actual, eqany, context...)
}
func Neq(t *testing.T, unexpected, actual interface{}, context ...interface{}) bool {
	t.Helper()
	return Cneq(t, unexpected, actual, eqany, context...)
}