MCPcopy
hub / github.com/stretchr/testify / Exactly

Function Exactly

assert/assertions.go:689–702  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

687//
688// assert.Exactly(t, int32(123), int64(123))
689func 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//

Callers 4

ExactlyFunction · 0.92
ExactlyfFunction · 0.70
TestExactlyFunction · 0.70
ExactlyMethod · 0.70

Calls 3

FailFunction · 0.70
EqualFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestExactlyFunction · 0.56