...
1 package cli
2
3 import (
4 "os"
5 "reflect"
6 "testing"
7 )
8
9 func init() {
10 _ = os.Setenv("CLI_TEMPLATE_REPANIC", "1")
11 }
12
13 func expect(t *testing.T, a interface{}, b interface{}) {
14 t.Helper()
15
16 if !reflect.DeepEqual(a, b) {
17 t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
18 }
19 }
20
21 func expectNotEqual(t *testing.T, a interface{}, b interface{}) {
22 t.Helper()
23
24 if reflect.DeepEqual(a, b) {
25 t.Errorf("Expected not equal, but got: %v (type %v), %v (type %v) ", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
26 }
27 }
28
View as plain text