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

Function TestTimeEqualityErrorFormatting

assert/assertions_test.go:2987–2996  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2985}
2986
2987func TestTimeEqualityErrorFormatting(t *testing.T) {
2988 t.Parallel()
2989
2990 mockT := new(mockTestingT)
2991
2992 Equal(mockT, time.Second*2, time.Millisecond)
2993
2994 expectedErr := "\\s+Error Trace:\\s+Error:\\s+Not equal:\\s+\n\\s+expected: 2s\n\\s+actual\\s+: 1ms\n"
2995 Regexp(t, regexp.MustCompile(expectedErr), mockT.errorString())
2996}
2997
2998func TestDiffEmptyCases(t *testing.T) {
2999 t.Parallel()

Callers

nothing calls this directly

Calls 3

errorStringMethod · 0.80
EqualFunction · 0.70
RegexpFunction · 0.70

Tested by

no test coverage detected