tunittest_error.nim 386 B

1234567891011121314151617181920212223
  1. discard """
  2. exitcode: 1
  3. outputsub: "failed: 1 == 3"
  4. matrix: "-d:case1; -d:case2"
  5. targets: "c js"
  6. joinable: false
  7. """
  8. when defined case1:
  9. import unittest
  10. suite "Test":
  11. test "test require":
  12. check 1==2
  13. check 1==3
  14. when defined case2:
  15. import unittest
  16. suite "Test":
  17. test "test require":
  18. require 1 == 3
  19. if true:
  20. quit 0 # intentional