/test/language/instruction/inspect/test_inspect5.e

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