PageRenderTime 12ms CodeModel.GetById 7ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/unclassified/test_rename2.e

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