/test/language/assertion/aux_all_check_test1.e

http://github.com/tybor/Liberty · Specman e · 68 lines · 37 code · 10 blank · 21 comment · 0 complexity · 58f6cbce7081804f2d51b4b38f9e9359 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 AUX_ALL_CHECK_TEST1
  5. create {ANY}
  6. make
  7. feature {ANY}
  8. require_count, ensure_count, invariant_count: INTEGER
  9. do_require: BOOLEAN
  10. do
  11. require_count := require_count + 1
  12. Result := True
  13. end
  14. do_ensure: BOOLEAN
  15. do
  16. ensure_count := ensure_count + 1
  17. Result := True
  18. end
  19. do_invariant: BOOLEAN
  20. do
  21. invariant_count := invariant_count + 1
  22. Result := True
  23. end
  24. make
  25. do
  26. end
  27. foo
  28. require
  29. do_require
  30. do
  31. ensure
  32. do_ensure
  33. end
  34. bar
  35. do
  36. foo
  37. end
  38. invariant
  39. do_invariant
  40. end -- class AUX_ALL_CHECK_TEST1
  41. --
  42. -- ------------------------------------------------------------------------------------------------------------------------------
  43. -- Copyright notice below. Please read.
  44. --
  45. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  46. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  47. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  48. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  49. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  50. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  51. --
  52. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  53. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  54. --
  55. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  56. --
  57. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  58. -- ------------------------------------------------------------------------------------------------------------------------------