Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions assert/assertions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3198,23 +3198,23 @@ func (ctt *captureTestingT) checkResultAndErrMsg(t *testing.T, expectedRes, res
contents := parseLabeledOutput(ctt.msg)
if res == true {
if contents != nil {
t.Errorf("Should not log an error")
t.Errorf("Should not log an error. Log output: %q", ctt.msg)
}
return
}
if contents == nil {
t.Errorf("Should log an error. Log output: %v", ctt.msg)
t.Errorf("Should log an error. Log output: %q", ctt.msg)
return
}
for _, content := range contents {
if content.label == "Error" {
if expectedErrMsg == content.content {
return
}
t.Errorf("Logged Error: %v", content.content)
t.Errorf("Recorded Error: %q", content.content)
}
}
t.Errorf("Should log Error: %v", expectedErrMsg)
t.Errorf("Expected Error: %q", expectedErrMsg)
}

func TestErrorIs(t *testing.T) {
Expand Down