urfave-cli/helpers_test.go

20 lines
458 B
Go
Raw Normal View History

package cli
2013-07-20 22:50:13 +00:00
import (
"reflect"
"testing"
)
/* Test Helpers */
func expect(t *testing.T, a interface{}, b interface{}) {
if !reflect.DeepEqual(a, b) {
2013-07-20 22:50:13 +00:00
t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
}
}
func refute(t *testing.T, a interface{}, b interface{}) {
if reflect.DeepEqual(a, b) {
2013-07-20 22:50:13 +00:00
t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
}
}