PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/agent/test_agent67.e

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