< Summary

Information
Class: Minesweeper.CellModule
Assembly: Minesweeper
File(s): /home/runner/work/poc-fsharp-tdd-kata-minesweeper2/poc-fsharp-tdd-kata-minesweeper2/src/Minesweeper/Cell.fs
Tag: 29_2333059465
Line coverage
86%
Covered lines: 13
Uncovered lines: 2
Coverable lines: 15
Total lines: 32
Line coverage: 86.6%
Branch coverage
85%
Covered branches: 12
Total branches: 14
Branch coverage: 85.7%
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Coverage History

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
isBomb(...)100%4100%
char(...)75%475%
add(...)100%4100%
click(...)50%266.66%

File(s)

/home/runner/work/poc-fsharp-tdd-kata-minesweeper2/poc-fsharp-tdd-kata-minesweeper2/src/Minesweeper/Cell.fs

#LineLine coverage
 1namespace Minesweeper
 2
 3open System
 4
 5type Cell =
 6    | Covered of Cell
 7    | Bomb
 8    | Number of int
 9
 10module Cell =
 11    let rec isBomb v =
 2212        match v with
 413        | Bomb -> true
 1014        | Covered x -> isBomb x
 815        | _ -> false
 16
 17    let char v =
 1218        match v with
 019        | Bomb -> '*'
 520        | Covered _ -> '.'
 721        | Number n -> Convert.ToChar(n + 48)
 22
 23    let rec add v =
 4924        match v with
 4825        | Covered x -> add x |> Covered
 4626        | Number n -> n + 1 |> Number
 227        | _ -> v
 28
 29    let click v =
 1430        match v with
 1431        | Covered x -> x
 032        | _ -> v