k_test.go 492 B

1234567891011121314151617
  1. package kata_test
  2. import (
  3. . "github.com/onsi/ginkgo"
  4. . "github.com/onsi/gomega"
  5. . "code.osinet.fr/fgm/codewars/kyu7/two_oldest_ages"
  6. )
  7. var _ = Describe("TwoOldestAges", func() {
  8. It("should return 18 and 83 for input []int{6,5,83,5,3,18}", func() {
  9. Expect(TwoOldestAges([]int{6, 5, 83, 5, 3, 18})).To(Equal([2]int{18, 83}))
  10. })
  11. It("should return 45 and 87 for input []int{1,5,87,45,8,8}", func() {
  12. Expect(TwoOldestAges([]int{1, 5, 87, 45, 8, 8})).To(Equal([2]int{45, 87}))
  13. })
  14. })