/test/language/instruction/inspect/test_inspect1.e

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