Skip to content

Commit

Permalink
rm 'That: ' from That and ThatNot asserter functions
Browse files Browse the repository at this point in the history
  • Loading branch information
lainio committed Mar 10, 2024
1 parent 1aeaa32 commit 8ab9b40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assert/assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func NotImplemented(a ...any) {
// single 'if-statement' that is almost nothing.
func ThatNot(term bool, a ...any) {
if term {
defMsg := "ThatNot: " + assertionMsg
defMsg := assertionMsg
Default().reportAssertionFault(defMsg, a)
}
}
Expand All @@ -278,7 +278,7 @@ func ThatNot(term bool, a ...any) {
// single 'if-statement' that is almost nothing.
func That(term bool, a ...any) {
if !term {
defMsg := "That: " + assertionMsg
defMsg := assertionMsg
Default().reportAssertionFault(defMsg, a)
}
}
Expand Down
2 changes: 1 addition & 1 deletion assert/assert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func ExampleThat() {
}
err := sample()
fmt.Printf("%v", err)
// Output: testing: run example: assert_test.go:16: ExampleThat.func1(): That: assertion violation: optional message
// Output: testing: run example: assert_test.go:16: ExampleThat.func1(): assertion violation: optional message
}

func ExampleNotNil() {
Expand Down

0 comments on commit 8ab9b40

Please sign in to comment.