/test/language/simplify/test_simplify10.e

http://github.com/tybor/Liberty · Specman e · 150 lines · 112 code · 13 blank · 25 comment · 18 complexity · 5733a68357cf0e74f6a81b5ab87ef4ec 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_SIMPLIFY10
  5. --
  6. -- To test routine body normalization.
  7. --
  8. --
  9. insert
  10. EIFFELTEST_TOOLS
  11. create {}
  12. make
  13. feature {ANY}
  14. f_0: BOOLEAN
  15. do
  16. if True then
  17. Result := True
  18. end
  19. end
  20. f_1 (a1: INTEGER): BOOLEAN
  21. do
  22. if True then
  23. Result := True
  24. end
  25. end
  26. f_2 (a1, a2: INTEGER): BOOLEAN
  27. do
  28. if True then
  29. Result := True
  30. end
  31. end
  32. make
  33. do
  34. if f_0 then
  35. assert(True)
  36. else
  37. c_inline_c("simplify error #1 in boost_simplify10")
  38. end
  39. if f_1(1) then
  40. assert(True)
  41. else
  42. c_inline_c("simplify error #2 in boost_simplify10")
  43. end
  44. if f_2(2, 2) then
  45. assert(True)
  46. else
  47. c_inline_c("simplify error #3 in boost_simplify10")
  48. end
  49. assert(assert_counter.item = 3)
  50. if g_0 then
  51. c_inline_c("simplify error #4 in boost_simplify10")
  52. else
  53. assert(True)
  54. end
  55. if g_1(1) then
  56. c_inline_c("simplify error #5 in boost_simplify10")
  57. else
  58. assert(True)
  59. end
  60. if g_2(2, 2) then
  61. c_inline_c("simplify error #6 in boost_simplify10")
  62. else
  63. assert(True)
  64. end
  65. assert(assert_counter.item = 7)
  66. if h_0 then
  67. c_inline_c("simplify error #7 in boost_simplify10")
  68. else
  69. assert(True)
  70. end
  71. if h_1(1) then
  72. c_inline_c("simplify error #8 in boost_simplify10")
  73. else
  74. assert(True)
  75. end
  76. if h_2(2, 2) then
  77. c_inline_c("simplify error #9 in boost_simplify10")
  78. else
  79. assert(True)
  80. end
  81. assert(assert_counter.item = 11)
  82. end
  83. g_0: BOOLEAN
  84. do
  85. if True then
  86. end
  87. end
  88. g_1 (a1: INTEGER): BOOLEAN
  89. do
  90. if True then
  91. end
  92. end
  93. g_2 (a1, a2: INTEGER): BOOLEAN
  94. do
  95. if True then
  96. end
  97. end
  98. h_0: BOOLEAN
  99. do
  100. Result := False
  101. if True then
  102. Result := False
  103. end
  104. end
  105. h_1 (a1: INTEGER): BOOLEAN
  106. do
  107. Result := False
  108. if True then
  109. Result := False
  110. end
  111. end
  112. h_2 (a1, a2: INTEGER): BOOLEAN
  113. do
  114. Result := False
  115. if True then
  116. Result := False
  117. end
  118. end
  119. end -- class TEST_SIMPLIFY10
  120. --
  121. -- ------------------------------------------------------------------------------------------------------------------------------
  122. -- Copyright notice below. Please read.
  123. --
  124. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  125. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  126. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  127. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  128. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  129. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  130. --
  131. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  132. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  133. --
  134. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  135. --
  136. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  137. -- ------------------------------------------------------------------------------------------------------------------------------