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