/test/language/agent/test_agent41.e

http://github.com/tybor/Liberty · Specman e · 61 lines · 32 code · 5 blank · 24 comment · 0 complexity · eca149f9151d2ae729b291dbaf6843ee 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_AGENT41
  5. -- SZ:232:
  6. -- for marking of base (current) parameter
  7. create {}
  8. make
  9. feature {}
  10. make
  11. local
  12. mem: MEMORY; aux: AUX_AGENT41
  13. do
  14. create aux
  15. doit := aux.get_agent
  16. aux := Void
  17. doit.call([])
  18. generate_garbage
  19. -- no error if this is commented out
  20. mem.collection_on
  21. mem.full_collect
  22. doit.call([])
  23. end
  24. doit: PROCEDURE[TUPLE]
  25. generate_garbage
  26. local
  27. i: INTEGER; s: STRING
  28. do
  29. from
  30. i := 1
  31. until
  32. i = 10000
  33. loop
  34. create s.make_from_string("quark ends here")
  35. i := i + 1
  36. end
  37. end
  38. end -- class TEST_AGENT41
  39. --
  40. -- ------------------------------------------------------------------------------------------------------------------------------
  41. -- Copyright notice below. Please read.
  42. --
  43. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  44. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  45. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  46. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  47. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  48. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  49. --
  50. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  51. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  52. --
  53. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  54. --
  55. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  56. -- ------------------------------------------------------------------------------------------------------------------------------