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