/test/language/agent/test_agent33.e

http://github.com/tybor/Liberty · Specman e · 57 lines · 29 code · 6 blank · 22 comment · 0 complexity · 29f9662c7a833cdd1ba3fea92a381b20 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_AGENT33
  5. -- bug from SZ:234:
  6. insert
  7. EIFFELTEST_TOOLS
  8. create {}
  9. make
  10. feature {}
  11. make
  12. local
  13. ab: AUX_AGENT33AB; ac: AUX_AGENT33AC; b: AUX_AGENT33B; c: AUX_AGENT33C
  14. do
  15. create ab.make
  16. ab.subscribe(agent rb(?))
  17. create ac.make
  18. ac.subscribe(agent rc(?))
  19. create b
  20. create c
  21. ab.publish(b)
  22. ac.publish(c)
  23. assert(assert_counter.item = 2)
  24. end
  25. rb (b: AUX_AGENT33B)
  26. do
  27. assert(assert_counter.item = 0)
  28. end
  29. rc (c: AUX_AGENT33C)
  30. do
  31. assert(assert_counter.item = 1)
  32. end
  33. end -- class TEST_AGENT33
  34. --
  35. -- ------------------------------------------------------------------------------------------------------------------------------
  36. -- Copyright notice below. Please read.
  37. --
  38. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  39. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  40. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  41. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  42. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  43. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  44. --
  45. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  46. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  47. --
  48. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  49. --
  50. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  51. -- ------------------------------------------------------------------------------------------------------------------------------