PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/test/language/simplify/inlining/test_inlining11.e

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