Skip to content

Commit

Permalink
3.3.2: better should-pass logic
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jun 8, 2021
1 parent 43ca9a0 commit 2f550e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion balls.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.3.1"
version = "3.3.2"
author = "disruptek"
description = "a unittest framework with balls 🔴🟡🟢"
license = "MIT"
Expand Down
15 changes: 7 additions & 8 deletions balls/runner.nim
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,6 @@ proc `[]=`(matrix: var Matrix; p: Profile; s: StatusKind) =
proc shouldPass(p: Profile): bool =
## true if the test should pass according to current nim climate
const MajorMinor = $NimMajor & "." & $NimMinor
case MajorMinor
of "1.4":
if p.gc <= orc:
result = true
of "1.2":
if p.gc <= arc:
result = true
# don't quit when run locally; just keep chugging away
if ci and ballsFailFast:
# neither cpp or js or nimscript backends are required to work
Expand All @@ -402,7 +395,13 @@ proc shouldPass(p: Profile): bool =
if p.gc notin {arc, orc}:
# danger builds can fail; they include experimental features
if p.opt notin {danger}:
result = true
case MajorMinor
of "1.4":
if p.gc <= orc:
result = true
of "1.2":
if p.gc <= arc:
result = true

proc performThreaded(p: Payload) {.thread.} =
var ran: string
Expand Down

0 comments on commit 2f550e0

Please sign in to comment.