12345678910111213141516171819202122232425 |
- // TODO: replace with your own tests (TDD). An example to get you started is included below.
- // Ginkgo BDD Testing Framework <http://onsi.github.io/ginkgo></http:>
- // Gomega Matcher Library <http://onsi.github.io/gomega></http:>
- package kata
- import (
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
- )
- func dotest(prod string, exp int) {
- var ans = duplicate_count(prod)
- Expect(ans).To(Equal(exp))
- }
- var _ = Describe("Test Example", func() {
- It("should handle basic cases", func() {
- dotest("abcde", 0)
- dotest("abcdea", 1)
- dotest("abcdeaB11", 3)
- dotest("indivisibility", 1)
- })
- })
|