github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/cli/helpers_test.go (about)

     1  package cli
     2  
     3  import (
     4  	"reflect"
     5  	"testing"
     6  )
     7  
     8  /* Test Helpers */
     9  func expect(t *testing.T, a interface{}, b interface{}) {
    10  	if !reflect.DeepEqual(a, b) {
    11  		t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
    12  	}
    13  }
    14  
    15  func refute(t *testing.T, a interface{}, b interface{}) {
    16  	if reflect.DeepEqual(a, b) {
    17  		t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
    18  	}
    19  }