55 lines
832 B
Markdown
Raw Permalink Normal View History

2023-07-05 10:05:54 +00:00
# assert
2023-07-05 11:14:37 +00:00
A minimal & stateless assert package for writing tests.
2023-08-31 15:03:52 +00:00
## Features
- Simple interface
- Tiny codebase
- Zero dependencies
2023-07-18 09:12:27 +00:00
## Installation
```shell
go get git.akyoto.dev/go/assert
```
2023-08-31 15:03:52 +00:00
## Usage
2023-07-05 11:14:37 +00:00
```go
assert.Nil(t, nil)
assert.True(t, true)
assert.Equal(t, "Hello", "Hello")
assert.DeepEqual(t, "Hello", "Hello")
assert.Contains(t, "Hello", "ello")
```
2023-08-31 15:03:52 +00:00
## 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](https://akyoto.dev/license).
## Copyright
© 2019 Eduard Urbach