/test/language/agent/test_agent60.e

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