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