tuserassert.nim 185 B

1234567891011121314
  1. discard """
  2. output: "x == 45ugh"
  3. """
  4. template myAssert(cond: untyped) =
  5. when 3 <= 3:
  6. let c = cond.astToStr
  7. if not cond:
  8. echo c, "ugh"
  9. var x = 454
  10. myAssert(x == 45)