k_test.go 418 B

1234567891011121314151617181920212223
  1. package kata_test
  2. import (
  3. . "github.com/onsi/ginkgo"
  4. . "github.com/onsi/gomega"
  5. )
  6. func doTest(n int64, exp []int) {
  7. var ans = Seven(n)
  8. Expect(ans).To(Equal(exp))
  9. }
  10. var _ = Describe("Tests Seven", func() {
  11. It("should handle basic cases", func() {
  12. //doTest(371, []int{10, 2})
  13. doTest(371, []int{35, 1})
  14. doTest(1603, []int{7, 2})
  15. doTest(477557101, []int{28, 7})
  16. doTest(477557102, []int{47, 7})
  17. })
  18. })