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