Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

assertion

go assertion without testing.

why I need it

I just want to find a tool that could make me write go assertions like:

assertion.Equals(expected, actual)
assertion.NotNull(actual)

instead of:

ifexpected!=actual {
panic("xxxxx")
}

but I cannot find a satisfied one. stretchr/testify is good but its code like:

assert.Equal(t, 123, 123, "they should be equal")

I don't write assertion code in testing so I have not parameter t with is tesing.T. I just think: "Why not I write a new tesing lib? I didn't want any powerful functions, I just wan't write too many if...panic..." ... and here it is.

About

go assertion without testing.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages