PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/agent/test_agent33.e

http://github.com/tybor/Liberty
Specman e | 57 lines | 29 code | 6 blank | 22 comment | 0 complexity | 29f9662c7a833cdd1ba3fea92a381b20 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_AGENT33
 5   -- bug from SZ:234:
 6
 7insert
 8   EIFFELTEST_TOOLS
 9
10create {}
11   make
12
13feature {}
14   make
15      local
16         ab: AUX_AGENT33AB; ac: AUX_AGENT33AC; b: AUX_AGENT33B; c: AUX_AGENT33C
17      do
18         create ab.make
19         ab.subscribe(agent rb(?))
20         create ac.make
21         ac.subscribe(agent rc(?))
22         create b
23         create c
24         ab.publish(b)
25         ac.publish(c)
26         assert(assert_counter.item = 2)
27      end
28
29   rb (b: AUX_AGENT33B)
30      do
31         assert(assert_counter.item = 0)
32      end
33
34   rc (c: AUX_AGENT33C)
35      do
36         assert(assert_counter.item = 1)
37      end
38
39end -- class TEST_AGENT33
40--
41-- ------------------------------------------------------------------------------------------------------------------------------
42-- Copyright notice below. Please read.
43--
44-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
45-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
46-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
47-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
48-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
49-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
50--
51-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
52-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
53--
54-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
55--
56-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
57-- ------------------------------------------------------------------------------------------------------------------------------