/[eiffelstudio]/trunk/eweasel/tests/agent012/test.e
ViewVC logotype

Contents of /trunk/eweasel/tests/agent012/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103061 - (show annotations)
Sun Apr 7 06:55:59 2019 UTC (6 months, 1 week ago) by alexk
File size: 751 byte(s)
Updated ECFs to enable class removal optimization when a test involves finalization.
Updated source code to use contemporary routine type declarations.

1 class
2 TEST
3
4 create
5 make
6
7 feature
8
9 make
10 do
11 test1
12 test2
13 end
14
15 test1
16 local
17 hs: HASH_TABLE [INTEGER, STRING]
18 hi: HASH_TABLE [INTEGER, INTEGER]
19 do
20 create hs.make (10)
21 create hi.make (10)
22 do_it_s (agent hs.force (3, ?))
23 print (hs.item ("foo"))
24 io.put_new_line
25 do_it_i (agent hi.force (3, ?))
26 print (hi.item (3))
27 io.put_new_line
28 end
29
30 do_it_s (a_action: PROCEDURE [STRING])
31 do
32 a_action.call (["foo"])
33 end
34
35 do_it_i (a_action: PROCEDURE [INTEGER])
36 do
37 a_action.call ([3])
38 end
39
40 test2
41 local
42 h: HASH_TABLE [ANY, HASHABLE]
43 a: HASHABLE
44 do
45 create {HASH_TABLE [INTEGER, INTEGER]} h.make (10)
46 a := 3
47 (agent h.force (3, ?)).call ([a])
48 print (h.item (3))
49 io.put_new_line
50 end
51 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date ID Revision

  ViewVC Help
Powered by ViewVC 1.1.23