Sha256: 531ebf47fb8506fb7f86ef62b448c4420979c0f6da012b3872c1584e37b90180

Contents?: true

Size: 961 Bytes

Versions: 240

Compression:

Stored size: 961 Bytes

Contents

module PascalsTriangleTest

open NUnit.Framework

open PascalsTriangle

[<Test>]
let ``One row`` () =
    Assert.That(triangle 1, Is.EqualTo([[1]]))
        
[<Test>]
[<Ignore("Remove to run test")>]
let ``Two rows`` () =
    Assert.That(triangle 2, Is.EqualTo([[1]; [1; 1]]))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Three rows`` () =
    Assert.That(triangle 3, Is.EqualTo([[1]; [1; 1]; [1; 2; 1]]))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Four rows`` () =
    Assert.That(triangle 4, Is.EqualTo([[1]; [1; 1]; [1; 2; 1]; [1; 3; 3; 1]]))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Five rows`` () =
    Assert.That(triangle 5, Is.EqualTo([[1]; [1; 1]; [1; 2; 1]; [1; 3; 3; 1]; [1; 4; 6; 4; 1]]))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Twenty rows`` () =
    Assert.That(triangle 20 |> List.last, Is.EqualTo([1; 19; 171; 969; 3876; 11628; 27132; 50388; 75582; 92378; 92378; 75582; 50388; 27132; 11628; 3876; 969; 171; 19; 1]))

Version data entries

240 entries across 240 versions & 1 rubygems

Version Path
trackler-2.2.1.22 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.21 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.20 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.19 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.18 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.17 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.16 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.15 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.14 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.13 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.12 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.11 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.10 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.9 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.8 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.7 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.6 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.5 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.4 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs
trackler-2.2.1.3 tracks/fsharp/exercises/pascals-triangle/PascalsTriangleTest.fs