Testify 支持断言,写法更简便
最后更新于:2022-04-02 02:51:53
[TOC]
> [github.com](https://github.com/stretchr/testify)
## demo
```
func TestIsIPV4WithTestify(t *testing.T) {
// 调用方式一
assertion := assert.New(t)
assertion.False(IsIPV4("192.168.0"))
// 方式二
assert.Equal(t, 123, 123, "they should be equal")
}
```
';