add total count to test helpers
This commit is contained in:
parent
6a24701bbf
commit
83e01994df
|
@ -173,6 +173,9 @@ macro jsonTest*(s: static[string], handler: untyped): untyped =
|
||||||
|
|
||||||
let `symbol`: array[Status, string] = ["+", "-", " "]
|
let `symbol`: array[Status, string] = ["+", "-", " "]
|
||||||
var raw = ""
|
var raw = ""
|
||||||
|
var okCountTotal = 0
|
||||||
|
var failCountTotal = 0
|
||||||
|
var skipCountTotal = 0
|
||||||
raw.add(`s` & "\n")
|
raw.add(`s` & "\n")
|
||||||
raw.add("===\n")
|
raw.add("===\n")
|
||||||
for folder, statuses in status:
|
for folder, statuses in status:
|
||||||
|
@ -192,7 +195,14 @@ macro jsonTest*(s: static[string], handler: untyped): untyped =
|
||||||
of Status.Skip: skipCount += 1
|
of Status.Skip: skipCount += 1
|
||||||
raw.add("```\n")
|
raw.add("```\n")
|
||||||
let sum = okCount + failCount + skipCount
|
let sum = okCount + failCount + skipCount
|
||||||
|
okCountTotal += okCount
|
||||||
|
failCountTotal += failCount
|
||||||
|
skipCountTotal += skipCount
|
||||||
raw.add("OK: " & $okCount & "/" & $sum & " Fail: " & $failCount & "/" & $sum & " Skip: " & $skipCount & "/" & $sum & "\n")
|
raw.add("OK: " & $okCount & "/" & $sum & " Fail: " & $failCount & "/" & $sum & " Skip: " & $skipCount & "/" & $sum & "\n")
|
||||||
|
|
||||||
|
let sumTotal = okCountTotal + failCountTotal + skipCountTotal
|
||||||
|
raw.add("\n---TOTAL---\n")
|
||||||
|
raw.add("OK: $1/$4 Fail: $2/$4 Skip: $3/$4\n" % [$okCountTotal, $failCountTotal, $skipCountTotal, $sumTotal])
|
||||||
writeFile(`s` & ".md", raw)
|
writeFile(`s` & ".md", raw)
|
||||||
|
|
||||||
func ethAddressFromHex*(s: string): EthAddress = hexToByteArray(s, result)
|
func ethAddressFromHex*(s: string): EthAddress = hexToByteArray(s, result)
|
||||||
|
|
Loading…
Reference in New Issue