/test/language/cecil/test_02.e
Specman e | 56 lines | 25 code | 6 blank | 25 comment | 0 complexity | 19da61975f6565341edbfe379d4dcfd5 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_02 5 6create {} 7 make 8 9feature {ANY} 10 memo: BOOLEAN 11 12 called_from_c 13 local 14 i: INTEGER 15 do 16 i := 1 17 -- Let's raise an Eiffel exception... 18 check 19 memo 20 end 21 end 22 23 make 24 do 25 call_c(Current) 26 rescue 27 memo := True 28 retry 29 end 30 31 call_c (c: like Current) 32 -- To avoid creating a C file ourself, 33 -- we'll force SE to use "call_c" 34 -- as the Cecil wrapper name for called_from_c. 35 external "C" 36 end 37 38end -- class TEST_02 39-- 40-- ------------------------------------------------------------------------------------------------------------------------------ 41-- Copyright notice below. Please read. 42-- 43-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, 44-- as published by the Free Software Foundation; either version 2, or (at your option) any later version. 45-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty 46-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have 47-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free 48-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 49-- 50-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE 51-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE 52-- 53-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN 54-- 55-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr 56-- ------------------------------------------------------------------------------------------------------------------------------