1
exercism fetch nim raindrops

raindrops_test.nim

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import tables
import unittest
import raindrops

test "convert 1":
  check convert(1) == "1"

test "convert 3":
  check convert(3) == "Pling"

test "convert 5":
  check convert(5) == "Plang"

test "convert 7":
  check convert(7) == "Plong"

test "convert 6":
  check convert(6) == "Pling"

test "convert 9":
  check convert(9) == "Pling"

test "convert 10":
  check convert(10) == "Plang"

test "convert 14":
  check convert(14) == "Plong"

test "convert 15":
  check convert(15) == "PlingPlang"

test "convert 21":
  check convert(21) == "PlingPlong"

test "convert 25":
  check convert(25) == "Plang"

test "convert 35":
  check convert(35) == "PlangPlong"

test "convert 49":
  check convert(49) == "Plong"

test "convert 52":
  check convert(52) == "52"

test "convert 105":
  check convert(105) == "PlingPlangPlong"

test "convert 12121":
  check convert(12121) == "12121"