|
@@ -0,0 +1,25 @@
|
|
|
+// 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)
|
|
|
+ })
|
|
|
+})
|