learning F#, it seems pretty cool, favourite functional language so far.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

PangramTests.fs 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // This file was auto-generated based on version 2.0.0 of the canonical data.
  2. module PangramTests
  3. open FsUnit.Xunit
  4. open Xunit
  5. open Pangram
  6. [<Fact>]
  7. let ``Empty sentence`` () =
  8. isPangram "" |> should equal false
  9. [<Fact>]
  10. let ``Perfect lower case`` () =
  11. isPangram "abcdefghijklmnopqrstuvwxyz" |> should equal true
  12. [<Fact>]
  13. let ``Only lower case`` () =
  14. isPangram "the quick brown fox jumps over the lazy dog" |> should equal true
  15. [<Fact>]
  16. let ``Missing the letter 'x'`` () =
  17. isPangram "a quick movement of the enemy will jeopardize five gunboats" |> should equal false
  18. [<Fact>]
  19. let ``Missing the letter 'h'`` () =
  20. isPangram "five boxing wizards jump quickly at it" |> should equal false
  21. [<Fact>]
  22. let ``With underscores`` () =
  23. isPangram "the_quick_brown_fox_jumps_over_the_lazy_dog" |> should equal true
  24. [<Fact>]
  25. let ``With numbers`` () =
  26. isPangram "the 1 quick brown fox jumps over the 2 lazy dogs" |> should equal true
  27. [<Fact>]
  28. let ``Missing letters replaced by numbers`` () =
  29. isPangram "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog" |> should equal false
  30. [<Fact>]
  31. let ``Mixed case and punctuation`` () =
  32. isPangram "\"Five quacking Zephyrs jolt my wax bed.\"" |> should equal true
  33. [<Fact>]
  34. let ``Case insensitive`` () =
  35. isPangram "the quick brown fox jumps over with lazy FX" |> should equal false