PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/agent/test_agent37.e

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