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