Sha256: 2881ce350a221b2ce706d4d58028b86760b45a17a7bce7809e48e618bbeb57a1
Contents?: true
Size: 1.05 KB
Versions: 76
Compression:
Stored size: 1.05 KB
Contents
module PythagoreanTripletTest open Xunit open FsUnit.Xunit open PythagoreanTriplet [<Theory(Skip = "Remove to run test")>] [<InlineData(3, 4, 5, true)>] [<InlineData(3, 5, 4, true)>] [<InlineData(4, 3, 5, true)>] [<InlineData(4, 5, 3, true)>] [<InlineData(5, 3, 4, true)>] [<InlineData(5, 4, 3, true)>] [<InlineData(3, 3, 3, false)>] [<InlineData(5, 6, 7, false)>] let ``Can recognize a valid pythagorean`` (x: int) (y: int) (z: int) (expected: bool) = let actual = triplet x y z isPythagorean actual |> should equal expected [<Fact(Skip = "Remove to run test")>] let ``Can create simple triplets`` () = let actual = pythagoreanTriplets 1 10 actual |> should equal [triplet 3 4 5; triplet 6 8 10] [<Fact(Skip = "Remove to run test")>] let ``Can create more triplets`` () = let actual = pythagoreanTriplets 11 20 actual |> should equal [triplet 12 16 20] [<Fact(Skip = "Remove to run test")>] let ``Can create complex triplets`` () = let actual = pythagoreanTriplets 56 95 actual |> should equal [triplet 57 76 95; triplet 60 63 87]
Version data entries
76 entries across 76 versions & 1 rubygems