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