k_test.go 689 B

123456789101112131415161718192021222324252627
  1. package kata_test
  2. import (
  3. . "github.com/onsi/ginkgo"
  4. . "github.com/onsi/gomega"
  5. . "code.osinet.fr/fgm/codewars/kyu7/find_n_1_common_letters"
  6. )
  7. var _ = Describe("General tests", func() {
  8. It("Sample 1", func() {
  9. Expect(MinQuine("AB Ab")).To(Equal([]string{"A"}))
  10. })
  11. It("Sample 2", func() {
  12. Expect(MinQuine("AbCD Abcd aBCd abcD")).To(Equal([]string{}))
  13. })
  14. It("Sample 3", func() {
  15. Expect(MinQuine("ABCD AbCD aBCD aBCd abcd")).To(Equal([]string{"ACD", "BCD", "aBC"}))
  16. })
  17. It("Sample 4", func() {
  18. Expect(MinQuine("ABCd AbCD aBCD aBCd abcd")).To(Equal([]string{"BCd", "aBC"}))
  19. })
  20. It("Repetition", func() {
  21. Expect(MinQuine("ABCD ABCD aBcd")).To(Equal([]string{}))
  22. })
  23. })