Updated formatting
All checks were successful
/ test (push) Successful in 14s

This commit is contained in:
Eduard Urbach 2025-06-06 16:49:43 +02:00
parent 046a393313
commit b3b33f85f5
Signed by: eduard
GPG key ID: 49226B848C78F6C8
13 changed files with 13 additions and 13 deletions

2
.gitignore vendored
View file

@ -4,4 +4,4 @@
!*.go !*.go
!*.md !*.md
!*.mod !*.mod
!*.sum !*.sum

View file

@ -83,4 +83,4 @@ func contains(container any, element any) bool {
} }
return false return false
} }

View file

@ -36,4 +36,4 @@ func TestFailContains(t *testing.T) {
func TestFailNotContains(t *testing.T) { func TestFailNotContains(t *testing.T) {
assert.NotContains(fail(t), "Hello", "H") assert.NotContains(fail(t), "Hello", "H")
} }

View file

@ -32,4 +32,4 @@ func DeepEqual[T any](t test, a T, b T) {
t.Errorf(twoParameters, file(), "DeepEqual", a, b) t.Errorf(twoParameters, file(), "DeepEqual", a, b)
t.FailNow() t.FailNow()
} }

View file

@ -39,4 +39,4 @@ func TestFailNotEqual(t *testing.T) {
func TestFailDeepEqual(t *testing.T) { func TestFailDeepEqual(t *testing.T) {
assert.DeepEqual(fail(t), "Hello", "World") assert.DeepEqual(fail(t), "Hello", "World")
} }

2
Nil.go
View file

@ -38,4 +38,4 @@ func isNil(object any) bool {
} }
return false return false
} }

View file

@ -42,4 +42,4 @@ func TestFailNil(t *testing.T) {
func TestFailNotNil(t *testing.T) { func TestFailNotNil(t *testing.T) {
assert.NotNil(fail(t), nil) assert.NotNil(fail(t), nil)
} }

View file

@ -8,4 +8,4 @@ func True(t test, a bool) {
// False asserts that the given parameter is false. // False asserts that the given parameter is false.
func False(t test, a bool) { func False(t test, a bool) {
Equal(t, a, false) Equal(t, a, false)
} }

View file

@ -9,4 +9,4 @@ import (
func TestTrue(t *testing.T) { func TestTrue(t *testing.T) {
assert.True(t, true) assert.True(t, true)
assert.False(t, false) assert.False(t, false)
} }

View file

@ -36,4 +36,4 @@ func file() string {
} }
return name return name
} }

View file

@ -16,4 +16,4 @@ func (t *noop) FailNow() {}
// fail creates a new test that is expected to fail. // fail creates a new test that is expected to fail.
func fail(t *testing.T) *noop { func fail(t *testing.T) *noop {
return &noop{} return &noop{}
} }

2
go.mod
View file

@ -1,3 +1,3 @@
module git.urbach.dev/go/assert module git.urbach.dev/go/assert
go 1.24 go 1.24

View file

@ -4,4 +4,4 @@ package assert
type test interface { type test interface {
Errorf(format string, args ...any) Errorf(format string, args ...any)
FailNow() FailNow()
} }