Sha256: 2d7229f7bbe86045ae8c3d3c5a16ff41315f09b04ffea603ba2ab9d5e074f188

Contents?: true

Size: 1.1 KB

Versions: 240

Compression:

Stored size: 1.1 KB

Contents

module QueenAttackTest

open System
open NUnit.Framework

open QueenAttack

[<Test>]
let ``Cannot occupy same space`` () =
    let white = (2, 4)
    let black = (2, 4)
    Assert.That((fun () -> canAttack white black |> ignore), Throws.Exception)

[<Test>]
[<Ignore("Remove to run test")>]
let ``Cannot attack`` () =
    Assert.False(canAttack (2, 3) (4, 7))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Can attack on same row`` () =
    Assert.True(canAttack (2, 4) (2, 7))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Can attack on same column`` () =
    Assert.True(canAttack (5, 4) (2, 4))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Can attack on diagonal`` () =
    Assert.True(canAttack (1, 1) (6, 6))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Can attack on other diagonal`` () =
    Assert.True(canAttack (0, 6) (1, 7))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Can attack on yet another diagonal`` () =
    Assert.True(canAttack (4, 1) (6, 3))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Can attack on a diagonal slanted the other way`` () =
    Assert.True(canAttack (6, 1) (1, 6))

Version data entries

240 entries across 240 versions & 1 rubygems

Version Path
trackler-2.1.0.45 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.44 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.43 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.42 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.41 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.40 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.39 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.38 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.37 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.36 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.34 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.33 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.32 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.31 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.30 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.29 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.28 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.27 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.26 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs
trackler-2.1.0.25 tracks/fsharp/exercises/queen-attack/QueenAttackTest.fs