Sha256: 0472f3cf362e4c3422eea0ef99e225a3b288c9d3fae23cf7b617ecb3683c620f

Contents?: true

Size: 1.87 KB

Versions: 51

Compression:

Stored size: 1.87 KB

Contents

// This file was auto-generated based on version 1.1.0 of the canonical data.

module GrainsTest

open FsUnit.Xunit
open Xunit

open Grains

[<Fact>]
let ``Returns the total number of grains on the board`` () =
    let expected: Result<uint64,string> = Ok 18446744073709551615UL
    total |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``1`` () =
    let expected: Result<uint64,string> = Ok 1UL
    square 1 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``2`` () =
    let expected: Result<uint64,string> = Ok 2UL
    square 2 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``3`` () =
    let expected: Result<uint64,string> = Ok 4UL
    square 3 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``4`` () =
    let expected: Result<uint64,string> = Ok 8UL
    square 4 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``16`` () =
    let expected: Result<uint64,string> = Ok 32768UL
    square 16 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``32`` () =
    let expected: Result<uint64,string> = Ok 2147483648UL
    square 32 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``64`` () =
    let expected: Result<uint64,string> = Ok 9223372036854775808UL
    square 64 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``Square 0 raises an exception`` () =
    let expected: Result<uint64,string> = Error "Invalid input"
    square 0 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``Negative square raises an exception`` () =
    let expected: Result<uint64,string> = Error "Invalid input"
    square -1 |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``Square greater than 64 raises an exception`` () =
    let expected: Result<uint64,string> = Error "Invalid input"
    square 65 |> should equal expected

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.179 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.178 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.177 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.176 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.175 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.174 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.173 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.172 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.171 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.170 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.169 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.167 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.166 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.165 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.164 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.163 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.162 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.161 tracks/fsharp/exercises/grains/GrainsTest.fs
trackler-2.2.1.160 tracks/fsharp/exercises/grains/GrainsTest.fs