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.22 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.21 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.20 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.19 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.18 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.17 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.16 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.15 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.14 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.13 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.12 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.11 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.10 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.9 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.8 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.7 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.6 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.5 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.4 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.2.1.3 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs