/test/language/instruction/precursor/test_precursor20.e
Specman e | 63 lines | 25 code | 6 blank | 32 comment | 0 complexity | 764a3a8e826c792dda6a819f67860c67 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_PRECURSOR20 5 -- 6 -- Written by Cyril Adrian 7 -- This bug shows a bad compilation when using both inspect and 8 -- Precursor at the same time 9 -- 10 -- test_precursor201.c: In function 'r25_P_26_find_string': 11 -- test_precursor201.c:1769: error: '_2' undeclared (first use in this function) 12 -- test_precursor201.c:1769: error: (Each undeclared identifier is reported only once 13 -- test_precursor201.c:1769: error: for each function it appears in.) 14 -- test_precursor201.c:1778: error: '_3' undeclared (first use in this function) 15 -- 16 17inherit 18 AUX_PRECURSOR20 19 redefine 20 find_string 21 end 22 23insert 24 EIFFELTEST_TOOLS 25 26create {} 27 make 28 29feature {} 30 find_string (string: STRING): BOOLEAN 31 do 32 inspect string 33 when "dummy" then 34 Result := True 35 else 36 Result := Precursor(string) 37 end 38 end 39 40 make 41 do 42 assert(find_string("dummy")) 43 end 44 45end -- class TEST_PRECURSOR19 46-- 47-- ------------------------------------------------------------------------------------------------------------------------------ 48-- Copyright notice below. Please read. 49-- 50-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, 51-- as published by the Free Software Foundation; either version 2, or (at your option) any later version. 52-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty 53-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have 54-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free 55-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 56-- 57-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE 58-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE 59-- 60-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN 61-- 62-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr 63-- ------------------------------------------------------------------------------------------------------------------------------