Sha256: b878df01f59209d0c436fe59fa5087c4a1718b230617802a51446db3d8ff2978

Contents?: true

Size: 1.24 KB

Versions: 240

Compression:

Stored size: 1.24 KB

Contents

module SaddlePointTest

open NUnit.Framework

open SaddlePoints

[<Test>]
let ``Readme example`` () =
    let values = [ [ 9; 8; 7 ]; 
                   [ 5; 3; 2 ]; 
                   [ 6; 6; 7 ] ]
    let actual = saddlePoints values
    Assert.That(actual, Is.EqualTo([(1, 0)]))

[<Test>]
[<Ignore("Remove to run test")>]
let ``No saddle point`` () =
    let values = [ [ 2; 1 ]; 
                   [ 1; 2 ] ]
    let actual = saddlePoints values
    Assert.That(actual, Is.Empty)

[<Test>]
[<Ignore("Remove to run test")>]
let ``Saddle point`` () =
    let values = [ [ 1; 2 ]; 
                   [ 3; 4 ] ]
    let actual = saddlePoints values
    Assert.That(actual, Is.EqualTo([(0, 1)]))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Another saddle point`` () =
    let values = [ [ 18;  3; 39; 19;  91 ]; 
                   [ 38; 10;  8; 77; 320 ]; 
                   [  3;  4;  8;  6;   7 ] ]
    let actual = saddlePoints values
    Assert.That(actual, Is.EqualTo([(2, 2)]))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Multiple saddle points`` () =
    let values = [ [ 4; 5; 4 ];
                   [ 3; 5; 5 ];
                   [ 1; 5; 4 ] ]
    let actual = saddlePoints values
    Assert.That(actual, Is.EqualTo([(0, 1); (1, 1); (2, 1)]))   

Version data entries

240 entries across 240 versions & 1 rubygems

Version Path
trackler-2.0.5.3 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.5.2 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.5.1 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.5.0 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.4.0 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.9 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.8 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.7 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.6 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.5 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.4 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.3 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.2 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.1 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.3.0 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.2.0 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.1.2 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.1.1 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.1.0 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.0.10 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs