Skip to content

sh1yu/assertion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

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:

if expected != 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

Watchers

Forks

Packages

No packages published

Languages