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