Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1 Commit

Repository files navigation

params

Build StatusCoverage StatusGo ReferenceMIT License

This package provides a simple way to run parameterized tests:

import (
"math""testing""github.com/nitroshare/compare""github.com/nitroshare/params"
)
funcTestSquareRoot(t*testing.T) {
typeVstruct {
NamestringNumberfloat64Rootfloat64
}
Run(
t,
func(t*testing.T, v*V) {
ifmath.Sqrt(v.Number) !=v.Root {
t.Fatal("root doesn't match!")
}
},
&V{
Name: "square root of nine",
Number: 9,
Root: 3,
},
)
}

This package works extremely well in conjunction with the compare package

About

Simple utility function for running parameterized tests

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages