learning F#, it seems pretty cool, favourite functional language so far.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // This file was auto-generated based on version 1.1.0 of the canonical data.
  2. module RaindropsTests
  3. open FsUnit.Xunit
  4. open Xunit
  5. open Raindrops
  6. [<Fact>]
  7. let ``The sound for 1 is 1`` () =
  8. convert 1 |> should equal "1"
  9. [<Fact>]
  10. let ``The sound for 3 is Pling`` () =
  11. convert 3 |> should equal "Pling"
  12. [<Fact>]
  13. let ``The sound for 5 is Plang`` () =
  14. convert 5 |> should equal "Plang"
  15. [<Fact>]
  16. let ``The sound for 7 is Plong`` () =
  17. convert 7 |> should equal "Plong"
  18. [<Fact>]
  19. let ``The sound for 6 is Pling as it has a factor 3`` () =
  20. convert 6 |> should equal "Pling"
  21. [<Fact>]
  22. let ``2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base`` () =
  23. convert 8 |> should equal "8"
  24. [<Fact>]
  25. let ``The sound for 9 is Pling as it has a factor 3`` () =
  26. convert 9 |> should equal "Pling"
  27. [<Fact>]
  28. let ``The sound for 10 is Plang as it has a factor 5`` () =
  29. convert 10 |> should equal "Plang"
  30. [<Fact>]
  31. let ``The sound for 14 is Plong as it has a factor of 7`` () =
  32. convert 14 |> should equal "Plong"
  33. [<Fact>]
  34. let ``The sound for 15 is PlingPlang as it has factors 3 and 5`` () =
  35. convert 15 |> should equal "PlingPlang"
  36. [<Fact>]
  37. let ``The sound for 21 is PlingPlong as it has factors 3 and 7`` () =
  38. convert 21 |> should equal "PlingPlong"
  39. [<Fact>]
  40. let ``The sound for 25 is Plang as it has a factor 5`` () =
  41. convert 25 |> should equal "Plang"
  42. [<Fact>]
  43. let ``The sound for 27 is Pling as it has a factor 3`` () =
  44. convert 27 |> should equal "Pling"
  45. [<Fact>]
  46. let ``The sound for 35 is PlangPlong as it has factors 5 and 7`` () =
  47. convert 35 |> should equal "PlangPlong"
  48. [<Fact>]
  49. let ``The sound for 49 is Plong as it has a factor 7`` () =
  50. convert 49 |> should equal "Plong"
  51. [<Fact>]
  52. let ``The sound for 52 is 52`` () =
  53. convert 52 |> should equal "52"
  54. [<Fact>]
  55. let ``The sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7`` () =
  56. convert 105 |> should equal "PlingPlangPlong"
  57. [<Fact>]
  58. let ``The sound for 3125 is Plang as it has a factor 5`` () =
  59. convert 3125 |> should equal "Plang"