/test/language/exceptions/test_exceptions23.e

http://github.com/tybor/Liberty · Specman e · 60 lines · 30 code · 8 blank · 22 comment · 1 complexity · 25ed6a795ce4a2d9f41d284c37ddf9aa MD5 · raw file

  1. -- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries.
  2. -- See the Copyright notice at the end of this file.
  3. --
  4. class TEST_EXCEPTIONS23
  5. -- SZ:280:
  6. create {}
  7. make
  8. create {TEST_EXCEPTIONS23}
  9. make_exception
  10. feature {ANY}
  11. make
  12. do
  13. exception_test
  14. end
  15. make_exception
  16. do
  17. my_invariant := True
  18. end
  19. exception_test
  20. local
  21. done: BOOLEAN; test: TEST_EXCEPTIONS23
  22. do
  23. if not done then
  24. done := True
  25. create test.make_exception
  26. end
  27. rescue
  28. test := Void
  29. retry
  30. end
  31. my_invariant: BOOLEAN
  32. invariant
  33. my_invariant_is_false: not my_invariant
  34. end -- class TEST_EXCEPTIONS23
  35. --
  36. -- ------------------------------------------------------------------------------------------------------------------------------
  37. -- Copyright notice below. Please read.
  38. --
  39. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  40. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  41. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  42. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  43. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  44. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  45. --
  46. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  47. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  48. --
  49. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  50. --
  51. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  52. -- ------------------------------------------------------------------------------------------------------------------------------