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.
 
 
 

19 line
427 B

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