learning F#, it seems pretty cool, favourite functional language so far.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // This file was auto-generated based on version 1.6.0 of the canonical data.
  2. module LeapTests
  3. open FsUnit.Xunit
  4. open Xunit
  5. open Leap
  6. [<Fact>]
  7. let ``Year not divisible by 4 in common year`` () =
  8. leapYear 2015 |> should equal false
  9. [<Fact>]
  10. let ``Year divisible by 2, not divisible by 4 in common year`` () =
  11. leapYear 1970 |> should equal false
  12. [<Fact>]
  13. let ``Year divisible by 4, not divisible by 100 in leap year`` () =
  14. leapYear 1996 |> should equal true
  15. [<Fact>]
  16. let ``Year divisible by 4 and 5 is still a leap year`` () =
  17. leapYear 1960 |> should equal true
  18. [<Fact>]
  19. let ``Year divisible by 100, not divisible by 400 in common year`` () =
  20. leapYear 2100 |> should equal false
  21. [<Fact>]
  22. let ``Year divisible by 100 but not by 3 is still not a leap year`` () =
  23. leapYear 1900 |> should equal false
  24. [<Fact>]
  25. let ``Year divisible by 400 in leap year`` () =
  26. leapYear 2000 |> should equal true
  27. [<Fact>]
  28. let ``Year divisible by 400 but not by 125 is still a leap year`` () =
  29. leapYear 2400 |> should equal true
  30. [<Fact>]
  31. let ``Year divisible by 200, not divisible by 400 in common year`` () =
  32. leapYear 1800 |> should equal false