Skip to content

Commit 8ab9b40

Browse files
committed
rm 'That: ' from That and ThatNot asserter functions
1 parent 1aeaa32 commit 8ab9b40

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

assert/assert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func NotImplemented(a ...any) {
268268
// single 'if-statement' that is almost nothing.
269269
func ThatNot(term bool, a ...any) {
270270
if term {
271-
defMsg := "ThatNot: " + assertionMsg
271+
defMsg := assertionMsg
272272
Default().reportAssertionFault(defMsg, a)
273273
}
274274
}
@@ -278,7 +278,7 @@ func ThatNot(term bool, a ...any) {
278278
// single 'if-statement' that is almost nothing.
279279
func That(term bool, a ...any) {
280280
if !term {
281-
defMsg := "That: " + assertionMsg
281+
defMsg := assertionMsg
282282
Default().reportAssertionFault(defMsg, a)
283283
}
284284
}

assert/assert_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func ExampleThat() {
1818
}
1919
err := sample()
2020
fmt.Printf("%v", err)
21-
// Output: testing: run example: assert_test.go:16: ExampleThat.func1(): That: assertion violation: optional message
21+
// Output: testing: run example: assert_test.go:16: ExampleThat.func1(): assertion violation: optional message
2222
}
2323

2424
func ExampleNotNil() {

0 commit comments

Comments
 (0)