/tests/tuples/

1e92ffe01'>tree commit diff stats
path: root/lib/nimhcr.nim.cfg
blob: 282bec27c293bae05be691cacb628162e8c7e1c9 (plain) (blame)
1
2
3
4
5
le class='blame blob'>
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                             
discard """
  outputsub: '''tquasiquote.nim(14,8): Check failed: 1 > 2'''
"""

import macros

macro check(ex: expr): stmt =
  var info = ex.lineInfo
  var expString = ex.toStrLit
  result = quote do:
    if not `ex`:
      echo `info`, ": Check failed: ", `expString`

check 1 > 2