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{})
| 652 | // |
| 653 | // assert.Exactly(t, int32(123), int64(123)) |
| 654 | func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { |
| 655 | if h, ok := t.(tHelper); ok { |
| 656 | h.Helper() |
| 657 | } |
| 658 | |
| 659 | aType := reflect.TypeOf(expected) |
| 660 | bType := reflect.TypeOf(actual) |
| 661 | |
| 662 | if aType != bType { |
| 663 | return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) |
| 664 | } |
| 665 | |
| 666 | return Equal(t, expected, actual, msgAndArgs...) |
| 667 | |
| 668 | } |
| 669 | |
| 670 | // NotNil asserts that the specified object is not nil. |
| 671 | // |
searching dependent graphs…