package assert
import "github.com/magiconair/properties/assert"
Package assert provides helper functions for testing.
Index ¶
- func Equal(t *testing.T, got, want interface{}, msg ...string)
- func Matches(t *testing.T, value, expr string)
- func Panic(t *testing.T, fn func(), matches string)
Functions ¶
func Equal ¶
Equal asserts that got and want are equal as defined by reflect.DeepEqual. The test fails with msg if they are not equal.
func Matches ¶
Matches asserts that a value matches a given regular expression.
func Panic ¶
Panic asserts that function fn() panics. It assumes that recover() either returns a string or an error and fails if the message does not match the regular expression in 'matches'.
Source Files ¶
- Version
- v1.8.10 (latest)
- Published
- Apr 9, 2025
- Platform
- darwin/amd64
- Imports
- 7 packages
- Last checked
- 56 minutes ago –
Tools for package owners.