Sha256: c3f431a3fdc5a0bdd5b7d29d5ed325bc7867bc0394073cf8c7adaae4c0fc37e8

Contents?: true

Size: 1.93 KB

Versions: 30

Compression:

Stored size: 1.93 KB

Contents

module DominoesTest

open Xunit
open FsUnit.Xunit

open Dominoes

[<Fact>]
let ``Empty input = empty output`` () =
    let actual = []
    canChain actual |> should equal true

[<Fact(Skip = "Remove to run test")>]
let ``Singleton input = singleton output`` () =
    let actual = [(1, 1)]
    canChain actual |> should equal true

[<Fact(Skip = "Remove to run test")>]
let ``Singleton that can't be chained`` () =
    let actual = [(1, 2)]
    canChain actual |> should equal false

[<Fact(Skip = "Remove to run test")>]
let ``Three elements`` () =
    let actual = [(1, 2); (3, 1); (2, 3)]
    canChain actual |> should equal true

[<Fact(Skip = "Remove to run test")>]
let ``Can reverse dominoes`` () =
    let actual = [(1, 2); (1, 3); (2, 3)]
    canChain actual |> should equal true

[<Fact(Skip = "Remove to run test")>]
let ``Can't be chained`` () =
    let actual = [(1, 2); (4, 1); (2, 3)]
    canChain actual |> should equal false

[<Fact(Skip = "Remove to run test")>]
let ``Disconnected - simple`` () =
    let actual = [(1, 1); (2, 2)]
    canChain actual |> should equal false

[<Fact(Skip = "Remove to run test")>]
let ``Disconnected - double loop`` () =
    let actual = [(1, 2); (2, 1); (3, 4); (4, 3)]
    canChain actual |> should equal false

[<Fact(Skip = "Remove to run test")>]
let ``Disconnected - single isolated`` () =
    let actual = [(1, 2); (2, 3); (3, 1); (4, 4)]
    canChain actual |> should equal false

[<Fact(Skip = "Remove to run test")>]
let ``Need backtrack`` () =
    let actual = [(1, 2); (2, 3); (3, 1); (2, 4); (2, 4)]
    canChain actual |> should equal true

[<Fact(Skip = "Remove to run test")>]
let ``Separate loops`` () =
    let actual = [(1, 2); (2, 3); (3, 1); (1, 1); (2, 2); (3, 3)]
    canChain actual |> should equal true

[<Fact(Skip = "Remove to run test")>]
let ``Ten elements`` () =
    let actual = [(1, 2); (5, 3); (3, 1); (1, 2); (2, 4); (1, 6); (2, 3); (3, 4); (5, 6)]
    canChain actual |> should equal true

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
trackler-2.2.1.52 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.51 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.50 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.49 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.48 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.47 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.46 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.45 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.44 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.43 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.42 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.41 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.40 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.39 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.38 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.37 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.36 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.35 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.34 tracks/fsharp/exercises/dominoes/DominoesTest.fs
trackler-2.2.1.33 tracks/fsharp/exercises/dominoes/DominoesTest.fs