balls icon indicating copy to clipboard operation
balls copied to clipboard

make expect work for compile-time if possible

Open disruptek opened this issue 5 years ago • 1 comments

import testes

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

suite "testes":
  block:
    expect ValueError:
      failcase("some string")

disruptek avatar Jan 06 '21 17:01 disruptek

Output:
⛔ expect ValueError:
⛔   failcase("some string"): compile failed
⛔  🗏   7  expect ValueError:
⛔  🗏   8    failcase("some string")
## 1 tests                  ⛔1

drtheuns avatar Jan 06 '21 17:01 drtheuns