Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make expect work for compile-time if possible #28

Open
disruptek opened this issue Jan 6, 2021 · 1 comment
Open

make expect work for compile-time if possible #28

disruptek opened this issue Jan 6, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@disruptek
Copy link
Owner

import testes

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

suite "testes":
  block:
    expect ValueError:
      failcase("some string")
@disruptek disruptek added the enhancement New feature or request label Jan 6, 2021
@drtheuns
Copy link

drtheuns commented Jan 6, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants