disruptek / balls

the testing framework with balls 🔴🟡🟢
MIT License
68 stars 7 forks source link

make expect work for compile-time if possible #28

Open disruptek opened 3 years ago

disruptek commented 3 years ago
import testes

func failcase(path: string): string {.compileTime.} =
  raise newException(ValueError, "nope.")

suite "testes":
  block:
    expect ValueError:
      failcase("some string")
drtheuns commented 3 years ago
Output:
⛔ expect ValueError:
⛔   failcase("some string"): compile failed
⛔  🗏   7  expect ValueError:
⛔  🗏   8    failcase("some string")
## 1 tests                  ⛔1