package kata_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "code.osinet.fr/fgm/codewars/kyu5/gap_in_primes" ) func dotest(k, start, nd int, exp []int) { var ans = Gap(k, start, nd) Expect(ans).To(Equal(exp)) } var _ = Describe("Test Example", func() { It("should handle basic cases", func() { dotest(2, 100, 110, []int{101, 103}) dotest(4, 100, 110, []int{103, 107}) dotest(6, 100, 110, nil) dotest(8, 300, 400, []int{359, 367}) dotest(10, 300, 400, []int{337, 347}) dotest(4, 30000, 100000, []int{30109, 30113}) dotest(6, 30000, 100000, []int{30091, 30097}) dotest(8, 30000, 100000, []int{30161, 30169}) dotest(11, 30000, 100000, nil) dotest(2, 10000000, 11000000, []int{10000139, 10000141}) }) })