🚦 A minimal & stateless assert package for writing tests. 8 Commits
2023-08-31 17:03:52 +02:00
.gitignore Improved code quality 2023-08-31 17:03:52 +02:00
Contains_test.go Improved code quality 2023-08-31 17:03:52 +02:00
Contains.go Improved code quality 2023-08-31 17:03:52 +02:00
Equal_test.go Improved code quality 2023-08-31 17:03:52 +02:00
Equal.go Improved code quality 2023-08-31 17:03:52 +02:00
errors_test.go Improved code quality 2023-08-31 17:03:52 +02:00
errors.go Improved code quality 2023-08-31 17:03:52 +02:00
go.mod Improved code quality 2023-08-31 17:03:52 +02:00
Nil_test.go Improved code quality 2023-08-31 17:03:52 +02:00
Nil.go Improved code quality 2023-08-31 17:03:52 +02:00
README.md Improved code quality 2023-08-31 17:03:52 +02:00
test.go Improved code quality 2023-08-31 17:03:52 +02:00
True_test.go Added basic assert functions 2023-07-05 15:46:19 +02:00
True.go Improved code quality 2023-08-31 17:03:52 +02:00

assert

A minimal & stateless assert package for writing tests.

Features

  • Simple interface
  • Tiny codebase
  • Zero dependencies

Installation

go get git.akyoto.dev/go/assert

Usage

assert.Nil(t, nil)
assert.True(t, true)
assert.Equal(t, "Hello", "Hello")
assert.DeepEqual(t, "Hello", "Hello")
assert.Contains(t, "Hello", "ello")

Tests

PASS: TestContains
PASS: TestNotContains
PASS: TestFailContains
PASS: TestFailNotContains
PASS: TestEqual
PASS: TestNotEqual
PASS: TestDeepEqual
PASS: TestFailEqual
PASS: TestFailNotEqual
PASS: TestFailDeepEqual
PASS: TestNil
PASS: TestNotNil
PASS: TestFailNil
PASS: TestFailNotNil
PASS: TestTrue
coverage: 100.0% of statements

License

Please see the license documentation.

© 2019 Eduard Urbach