Skip to content

Commit 5f48c62

Browse files
craig65535dolmen
authored andcommitted
address some review comments
1 parent b7c378d commit 5f48c62

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

assert/assertions_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,6 +2908,8 @@ func Test_truncatingFormat(t *testing.T) {
29082908
}
29092909
}
29102910

2911+
// parseLabeledOutput does the inverse of labeledOutput - it takes a formatted
2912+
// output string and turns it back into a slice of labeledContent.
29112913
func parseLabeledOutput(output string) []labeledContent {
29122914
labelPattern := regexp.MustCompile(`^\t([^\t]*): *\t(.*)$`)
29132915
contentPattern := regexp.MustCompile(`^\t *\t(.*)$`)
@@ -3037,8 +3039,8 @@ func TestErrorIs(t *testing.T) {
30373039
}
30383040
for _, tt := range tests {
30393041
tt := tt
3040-
mockT := new(captureTestingT)
30413042
t.Run(fmt.Sprintf("ErrorIs(%#v,%#v)", tt.err, tt.target), func(t *testing.T) {
3043+
mockT := new(captureTestingT)
30423044
res := ErrorIs(mockT, tt.err, tt.target)
30433045
mockT.checkResultAndErrMsg(t, tt.result, res, tt.resultErrMsg)
30443046
})
@@ -3100,8 +3102,8 @@ func TestNotErrorIs(t *testing.T) {
31003102
}
31013103
for _, tt := range tests {
31023104
tt := tt
3103-
mockT := new(captureTestingT)
31043105
t.Run(fmt.Sprintf("NotErrorIs(%#v,%#v)", tt.err, tt.target), func(t *testing.T) {
3106+
mockT := new(captureTestingT)
31053107
res := NotErrorIs(mockT, tt.err, tt.target)
31063108
mockT.checkResultAndErrMsg(t, tt.result, res, tt.resultErrMsg)
31073109
})

0 commit comments

Comments
 (0)