tunittest_error.nim 310 B

12345678910111213141516171819202122232425
  1. discard """
  2. exitcode: 1
  3. outputsub: "[FAILED] with exception"
  4. """
  5. # see also: `tests/stdlib/tunittest_error.nim`
  6. import unittest
  7. proc ddd() =
  8. raise newException(IOError, "didn't do stuff")
  9. proc ccc() =
  10. ddd()
  11. proc bbb() =
  12. ccc()
  13. proc aaa() =
  14. bbb()
  15. test "with exception":
  16. check 3 == 3
  17. aaa()