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.6.24 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.23 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.22 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.21 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.20 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.19 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.18 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.17 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.16 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.15 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.14 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.13 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.12 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.11 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.10 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.9 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.8 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.7 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.6 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs
trackler-2.0.6.5 tracks/fsharp/exercises/saddle-points/SaddlePointTest.fs