/test/language/gc/ISMM98/PMO/test_bench.e

http://github.com/tybor/Liberty · Specman e · 71 lines · 41 code · 6 blank · 24 comment · 0 complexity · 9dc68b1a9529c4e97f1e63efd01f856e 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_BENCH
  5. create {}
  6. make
  7. feature {ANY}
  8. fruit_array: ARRAY[FRUIT]
  9. apple: APPLE
  10. peach: PEACH
  11. make
  12. local
  13. i, limit: INTEGER
  14. do
  15. limit := 300000
  16. create fruit_array.make(1, limit)
  17. -- Filling `fruit_array' with apples :
  18. from
  19. i := 1
  20. until
  21. i > limit
  22. loop
  23. create apple.make(i)
  24. fruit_array.put(apple, i)
  25. i := i + 1
  26. end
  27. -- To clear `fruit_array' contents :
  28. from
  29. i := 1
  30. until
  31. i > limit
  32. loop
  33. fruit_array.put(Void, i)
  34. i := i + 1
  35. end
  36. -- Filling `fruit_array' with peaches :
  37. from
  38. i := 1
  39. until
  40. i > limit
  41. loop
  42. create peach.make(i)
  43. fruit_array.put(peach, i)
  44. i := i + 1
  45. end
  46. end
  47. end -- class TEST_BENCH
  48. --
  49. -- ------------------------------------------------------------------------------------------------------------------------------
  50. -- Copyright notice below. Please read.
  51. --
  52. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  53. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  54. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  55. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  56. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  57. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  58. --
  59. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  60. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  61. --
  62. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  63. --
  64. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  65. -- ------------------------------------------------------------------------------------------------------------------------------