/test/language/simplify/test_simplify06.e

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