k_test.go 840 B

123456789101112131415161718192021222324
  1. // TODO: replace with your own tests (TDD). An example to get you started is included below.
  2. // Ginkgo BDD Testing Framework <http://onsi.github.io/ginkgo></http:>
  3. // Gomega Matcher Library <http://onsi.github.io/gomega></http:>
  4. package kata
  5. import (
  6. . "github.com/onsi/ginkgo"
  7. . "github.com/onsi/gomega"
  8. )
  9. var _ = Describe("Example test:", func() {
  10. It("Should work for fixed tests", func() {
  11. Expect(solution("", "")).To(Equal(true))
  12. Expect(solution(" ", "")).To(Equal(true))
  13. Expect(solution("abc", "c")).To(Equal(true))
  14. Expect(solution("banana", "ana")).To(Equal(true))
  15. Expect(solution("a", "z")).To(Equal(false))
  16. Expect(solution("", "t")).To(Equal(false))
  17. Expect(solution("$a = $b + 1", "+1")).To(Equal(false))
  18. Expect(solution(" ", " ")).To(Equal(true))
  19. Expect(solution("1oo", "100")).To(Equal(false))
  20. })
  21. })