From 8ab9b400f0e2501e077b4950a1d39b192fec574c Mon Sep 17 00:00:00 2001 From: Harri Lainio Date: Sun, 10 Mar 2024 10:03:35 +0200 Subject: [PATCH] rm 'That: ' from That and ThatNot asserter functions --- assert/assert.go | 4 ++-- assert/assert_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assert/assert.go b/assert/assert.go index 8edd61a..e97f18b 100644 --- a/assert/assert.go +++ b/assert/assert.go @@ -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) } } @@ -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) } } diff --git a/assert/assert_test.go b/assert/assert_test.go index 3314348..2db8b34 100644 --- a/assert/assert_test.go +++ b/assert/assert_test.go @@ -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() {