Skip to content

miketonks/conveymany

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

conveymany

TestTables for go-convey

func TestIsPrime(t *testing.T) {

	// Only pass t into top-level Convey calls
	Convey("When IsPrime is called", t, func() {

		ConveyMany("When the number is a prime number, the result should be true",

			TestTable(2, 3, 5, 7, 11, 13, 17, 19),

			func(n int) {
				So(IsPrime(n), ShouldBeTrue)
			})

		ConveyMany("When the number is not a prime number, the result should be false",

			TestTable(1, 4, 6, 8, 9, 10, 12),

			func(n int) {
				So(IsPrime(n), ShouldBeFalse)
			})
	})
}

About

TestTables for go-convey

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages