/test/language/gc/test_agent_gc.e

http://github.com/tybor/Liberty · Specman e · 63 lines · 28 code · 5 blank · 30 comment · 0 complexity · 20070450a38550c36e2cf2cc2cc34f11 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_AGENT_GC
  5. insert
  6. ARGUMENTS
  7. EIFFELTEST_TOOLS
  8. create {}
  9. make
  10. feature {ANY}
  11. make
  12. local
  13. i, n: INTEGER; region: AUX_AGENT_GC1; t: AUX_AGENT_GC5
  14. do
  15. --if argument_count = 1 and then argument(1).is_integer then
  16. -- n := argument(1).to_integer
  17. --end
  18. --n := n.max(10)
  19. n := 1000
  20. create region.make_main
  21. from
  22. until
  23. i = n
  24. loop
  25. region.next_time
  26. i := i + 1
  27. end
  28. t := region.accumulate_totals
  29. -- print("Patients: " + t.patients.out + "%N")
  30. -- print("Time: " + t.time.out + "%N")
  31. -- print("Visits: " + t.visits.out + "%N")
  32. -- print("%NTreatment Queue - Remaining Treatment Time%N")
  33. region.hospital.treatment.for_each(agent end_print(?))
  34. assert(True)
  35. end
  36. end_print (p: AUX_AGENT_GC3)
  37. do
  38. -- print(p.remaining_time.out + "%Tanonymous patient%N")
  39. end
  40. end -- class TEST_AGENT_GC
  41. --
  42. -- ------------------------------------------------------------------------------------------------------------------------------
  43. -- Copyright notice below. Please read.
  44. --
  45. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  46. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  47. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  48. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  49. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  50. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  51. --
  52. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  53. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  54. --
  55. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  56. --
  57. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  58. -- ------------------------------------------------------------------------------------------------------------------------------