/test/language/agent/test_agent60.e
Specman e | 64 lines | 33 code | 7 blank | 24 comment | 0 complexity | 773f269d1421e311a26f10624a3f2af8 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_AGENT60 5 -- 6 -- What about is_equal on agents? 7 -- 8 9insert 10 EIFFELTEST_TOOLS 11 12create {} 13 main 14 15feature {} 16 main 17 local 18 agent1, agent2: PROCEDURE[TUPLE[STRING]]; agent3: PROCEDURE[TUPLE[STRING, STRING]]; other: like Current 19 do 20 agent1 := agent foo(?) 21 assert(agent1.is_equal(agent1)) 22 agent2 := agent foo(?) 23 assert(agent1 /= agent2) 24 assert(agent1.is_equal(agent2)) 25 agent3 := agent bar(?, ?) 26 assert(not agent3.is_equal(agent2)) 27 other := Current.twin 28 agent2 := agent other.foo(?) 29 assert(agent1 /= agent2) 30 assert(not agent1.is_equal(agent2)) 31 end 32 33feature {ANY} 34 dummy: INTEGER 35 36 foo (arg: STRING) 37 do 38 dummy := dummy 39 end 40 41 bar (arg1, arg2: STRING) 42 do 43 dummy := dummy 44 end 45 46end -- class TEST_AGENT60 47-- 48-- ------------------------------------------------------------------------------------------------------------------------------ 49-- Copyright notice below. Please read. 50-- 51-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, 52-- as published by the Free Software Foundation; either version 2, or (at your option) any later version. 53-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty 54-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have 55-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free 56-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 57-- 58-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE 59-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE 60-- 61-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN 62-- 63-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr 64-- ------------------------------------------------------------------------------------------------------------------------------