PageRenderTime 13ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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