+
Skip to content

Tags: alecthomas/assert

Tags

v2.11.0

Toggle v2.11.0's commit message
chore: rename ContainsItem to SliceContains (and add NotSliceContains)

v2.10.0

Toggle v2.10.0's commit message
feat: expose Diff() function

v2.9.0

Toggle v2.9.0's commit message
feat: add HasSuffix and HasPrefix

I am manually doing this  a lot in a very janky way: `assert.True(t,
strings.HasPrefix(...))`

v2.8.1

Toggle v2.8.1's commit message
fix: remove "No newline..."

v2.8.0

Toggle v2.8.0's commit message
feat: add IgnoreGoStringer()

v2.7.0

Toggle v2.7.0's commit message
feat: use %+v for displaying errors

Some error tracing libraries use this to write the full trace, which is
useful when debugging.

v2.6.0

Toggle v2.6.0's commit message
chore: bump repr to 0.4.0

v2.5.0

Toggle v2.5.0's commit message
feat: add OmitEmpty() compare option

v2.4.1

Toggle v2.4.1's commit message
fix: panic if message format arg is not a string

v2.4.0

Toggle v2.4.0's commit message
feat: support excluding types from comparison

This is supported by extending the `msgAndArgs...any` variadic parameter
to `msgArgsAndCompareOptions...any`. Any argument that is an
`assert.CompareOption` will be passed to `assert.Compare`.

eg.

```go
assert.Equal(t, a, b, "Unequal! %#v != %#v", a, b, assert.Exclude[time.Time]())
```
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载