/test/language/gc/test_link_list1.e

http://github.com/tybor/Liberty · Specman e · 59 lines · 35 code · 3 blank · 21 comment · 0 complexity · b741c2a5dba8815638f6e97514ef2331 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_LINK_LIST1
  5. create {}
  6. make
  7. feature {ANY}
  8. make
  9. local
  10. big_list: LINKED_LIST[INTEGER]; i, j: INTEGER; iteration: INTEGER
  11. do
  12. iteration := 1000
  13. create big_list.make
  14. from
  15. j := 0
  16. until
  17. j > 3
  18. loop
  19. from
  20. i := 1
  21. until
  22. i > iteration
  23. loop
  24. big_list.add_last(i)
  25. i := i + 1
  26. end
  27. from
  28. i := 1
  29. until
  30. i > iteration
  31. loop
  32. big_list.remove_first
  33. i := i + 1
  34. end
  35. j := j + 1
  36. end
  37. end
  38. end -- class TEST_LINK_LIST1
  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. -- ------------------------------------------------------------------------------------------------------------------------------