PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/test/language/simplify/test_simplify12.e

http://github.com/tybor/Liberty
Specman e | 85 lines | 53 code | 7 blank | 25 comment | 3 complexity | 1ebc3540ca904bb239a6f47e6f77c7ca 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_SIMPLIFY12
 5   --
 6   -- To test routine body normalization (extra initialization removal).
 7   --
 8   --
 9
10insert
11   EIFFELTEST_TOOLS
12
13create {}
14   make
15
16feature {ANY}
17   f_0: BOOLEAN
18      local
19         a: INTEGER; b: CHARACTER; c: STRING
20      do
21         a := 0
22         b := '%U'
23         c := Void
24         Result := True
25      end
26
27   f_1 (a1: INTEGER): BOOLEAN
28      local
29         a: INTEGER; b: CHARACTER; c: STRING
30      do
31         a := 0
32         b := '%U'
33         c := Void
34         Result := True
35      end
36
37   f_2 (a1, a2: INTEGER): BOOLEAN
38      local
39         a: INTEGER; b: CHARACTER; c: STRING
40      do
41         a := 0
42         b := '%U'
43         c := Void
44         Result := True
45      end
46
47   make
48      do
49         if f_0 then
50            assert(True)
51         else
52            c_inline_c("simplify error #1 in boost_simplify12")
53         end
54         if f_1(1) then
55            assert(True)
56         else
57            c_inline_c("simplify error #2 in boost_simplify12")
58         end
59         if f_2(2, 2) then
60            assert(True)
61         else
62            c_inline_c("simplify error #3 in boost_simplify12")
63         end
64         assert(assert_counter.item = 3)
65      end
66
67end -- class TEST_SIMPLIFY12
68--
69-- ------------------------------------------------------------------------------------------------------------------------------
70-- Copyright notice below. Please read.
71--
72-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
73-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
74-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
75-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
76-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
77-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
78--
79-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
80-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
81--
82-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
83--
84-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
85-- ------------------------------------------------------------------------------------------------------------------------------