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.2.1.2 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.1 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.0 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.0.6 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.0.5 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.0.4 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.0.3 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.0.2 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.0.1 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.0.0 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.55 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.54 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.53 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.52 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.51 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.50 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.49 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.48 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.47 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.1.0.46 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs