MCPcopy Create free account
hub / github.com/stretchr/testify / TestTimeEqualityErrorFormatting

Function TestTimeEqualityErrorFormatting

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

Source from the content-addressed store, hash-verified

2594}
2595
2596func TestTimeEqualityErrorFormatting(t *testing.T) {
2597 mockT := new(mockTestingT)
2598
2599 Equal(mockT, time.Second*2, time.Millisecond)
2600
2601 expectedErr := "\\s+Error Trace:\\s+Error:\\s+Not equal:\\s+\n\\s+expected: 2s\n\\s+actual\\s+: 1ms\n"
2602 Regexp(t, regexp.MustCompile(expectedErr), mockT.errorString())
2603}
2604
2605func TestDiffEmptyCases(t *testing.T) {
2606 Equal(t, "", diff(nil, nil))

Callers

nothing calls this directly

Calls 3

errorStringMethod · 0.80
EqualFunction · 0.70
RegexpFunction · 0.70

Tested by

no test coverage detected