Exactly asserts that two objects are equal in value and type. assert.Exactly(t, int32(123), int64(123))
(t TestingT, expected, actual interface{}, msgAndArgs ...interface{})
| 687 | // |
| 688 | // assert.Exactly(t, int32(123), int64(123)) |
| 689 | func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { |
| 690 | if h, ok := t.(tHelper); ok { |
| 691 | h.Helper() |
| 692 | } |
| 693 | |
| 694 | aType := reflect.TypeOf(expected) |
| 695 | bType := reflect.TypeOf(actual) |
| 696 | |
| 697 | if aType != bType { |
| 698 | return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) |
| 699 | } |
| 700 | |
| 701 | return Equal(t, expected, actual, msgAndArgs...) |
| 702 | } |
| 703 | |
| 704 | // NotNil asserts that the specified object is not nil. |
| 705 | // |