You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
urfave-cli/helpers_test.go

27 lines
456 B

package cli
11 years ago
import (
"os"
11 years ago
"reflect"
"runtime"
"strings"
11 years ago
"testing"
)
var (
wd, _ = os.Getwd()
)
func init() {
5 years ago
_ = os.Setenv("CLI_TEMPLATE_REPANIC", "1")
}
11 years ago
func expect(t *testing.T, a interface{}, b interface{}) {
_, fn, line, _ := runtime.Caller(1)
fn = strings.Replace(fn, wd+"/", "", -1)
if !reflect.DeepEqual(a, b) {
t.Errorf("(%s:%d) Expected %v (type %v) - Got %v (type %v)", fn, line, b, reflect.TypeOf(b), a, reflect.TypeOf(a))
11 years ago
}
}