Skip to content

Commit

Permalink
[ ux ] Add the last newline to the printing of the model coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
buzden committed Sep 26, 2023
1 parent b27da69 commit 742516b
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Test/DepTyCheck/Gen/Coverage.idr
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ showType False ti = show ti.name
showType True ti = joinBy "." $ forget $ uncurry lappend $ map (singleton . show . bolden) $ unsnoc $ split (== '.') $ show ti.name

toString : (colourful : Bool) -> CoverageGenInfo g -> String
toString col cgi = joinBy "\n\n" $ mapMaybe (\ti => lookup ti cgi.coverageInfo <&> (ti,)) (SortedMap.values cgi.types) <&> \(ti, tyCov, cons) => do
toString col cgi = (++ "\n") $ joinBy "\n\n" $ mapMaybe (\ti => lookup ti cgi.coverageInfo <&> (ti,)) (SortedMap.values cgi.types) <&> \(ti, tyCov, cons) => do
let conCovs = values cons
let anyCons = not $ null conCovs
let allConsCovered = all (== True) conCovs
Expand Down
1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-derived-001/expected
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ PrintCoverage.Y covered fully
- Y1: covered
- Y2: covered
- Y3: covered

1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-derived-002/expected
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ PrintCoverage.Y covered fully
- Y1: covered
- Y2: covered
- Y3: covered

1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-derived-003/expected
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ PrintCoverage.X covered partially
PrintCoverage.Y covered partially
- YF: covered
- YT: not covered

1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-001/expected
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ PrintCoverage.Y covered partially
- Y1: covered
- Y2: not covered
- Y3: covered

1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-002/expected
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ PrintCoverage.Y covered partially
- Y1: covered
- Y2: not covered
- Y3: covered

1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-003/expected
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ PrintCoverage.Y covered partially
- Y1: covered
- Y2: not covered
- Y3: covered

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ main = do
let mc = concatMap fst vs
let ci = registerCoverage mc ci
putStrLn $ show ci
putStrLn "\n--------\n"
putStrLn "--------\n"
do let vs = unGenTryND 100 someStdGen $ genY (limit 10) 3
let mc = concatMap fst vs
let ci = registerCoverage mc ci
Expand Down
1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-004/expected
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ PrintCoverage.Y covered partially
- Y1: not covered
- Y2: not covered
- Y3: covered

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main = do
let mc = concatMap fst vs
let ci = registerCoverage mc ci
putStrLn $ show ci
putStrLn "\n--------\n"
putStrLn "--------\n"
do let vs = unGenTryND 100 someStdGen $ genY (limit 10) 3
let mc = concatMap fst vs
let ci = registerCoverage mc ci
Expand Down
1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-005/expected
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ PrintCoverage.Y covered partially
- Y1: not covered
- Y2: not covered
- Y3: covered

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main = do
let mc = concatMap fst vs
let ci = registerCoverage mc ci
putStrLn $ show @{Colourful} ci
putStrLn "\n--------\n"
putStrLn "--------\n"
do let vs = unGenTryND 100 someStdGen $ genY (limit 10) 3
let mc = concatMap fst vs
let ci = registerCoverage mc ci
Expand Down
1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-006/expected
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ PrintCoverage.Y covered partially
- Y1: not covered
- Y2: not covered
- Y3: covered

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ main = do
let mc = concatMap fst vs
let ci = registerCoverage mc ci
putStrLn $ show ci
putStrLn "\n--------\n"
putStrLn "--------\n"
do let vs = unGenTryND 100 someStdGen $ genY 3
let mc = concatMap fst vs
let ci = registerCoverage mc ci
Expand Down
1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-007/expected
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ PrintCoverage.X covered partially

PrintCoverage.Y not covered
- MkY: not covered

1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-008/expected
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Prelude.Types.Maybe not covered
PrintCoverage.X covered partially
- X1: covered
- X2: not covered

4 changes: 2 additions & 2 deletions tests/lib/coverage/ty-and-con-withCov-009/PrintCoverage.idr
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ main = do
let mc = concatMap fst vs
let ci = registerCoverage mc ci
putStrLn $ show ci
putStrLn "\n--------\n"
putStrLn "--------\n"
do let vs = unGenTryND 100 someStdGen $ genX 1
let mc = concatMap fst vs
let ci = registerCoverage mc ci
putStrLn $ show ci
putStrLn "\n--------\n"
putStrLn "--------\n"
do let vs = unGenTryND 100 someStdGen $ genX 2
let mc = concatMap fst vs
let ci = registerCoverage mc ci
Expand Down
1 change: 1 addition & 0 deletions tests/lib/coverage/ty-and-con-withCov-009/expected
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ Prelude.Types.Nat not covered
PrintCoverage.X covered partially
- X1: not covered
- X2: covered

0 comments on commit 742516b

Please sign in to comment.