learning F#, it seems pretty cool, favourite functional language so far.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

TwoFerTests.fs 454B

123456789101112131415161718192021
  1. // This file was auto-generated based on version 1.2.0 of the canonical data.
  2. module TwoFerTests
  3. open FsUnit.Xunit
  4. open Xunit
  5. open TwoFer
  6. [<Fact>]
  7. let ``No name given`` () =
  8. twoFer None |> should equal "One for you, one for me."
  9. [<Fact>]
  10. let ``A name given`` () =
  11. twoFer (Some "Alice") |> should equal "One for Alice, one for me."
  12. [<Fact>]
  13. let ``Another name given`` () =
  14. twoFer (Some "Bob") |> should equal "One for Bob, one for me."