PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/unclassified/test_inherit5.e

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