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

/test/language/agent/test_agent68.e

http://github.com/tybor/Liberty
Specman e | 40 lines | 34 code | 6 blank | 0 comment | 0 complexity | ecd65a59ad509abddf2d73afbc3f7301 MD5 | raw file
 1class TEST_AGENT68
 2
 3insert
 4   EIFFELTEST_TOOLS
 5
 6create {}
 7   make
 8
 9feature {}
10   output: NULL_OUTPUT_STREAM
11      once
12         create Result
13      end
14
15   make
16      local
17         actions: FAST_ARRAY[TUPLE[STRING, PROCEDURE[TUPLE]]]
18         i: INTEGER
19      do
20         create actions.make(0)
21         actions.add_last(["one", agent say("hello")])
22         actions.add_last(["two", agent say("world")])
23         from
24            i := actions.lower
25         until
26            i > actions.upper
27         loop
28            output.put_string(actions.item(i).first)
29            output.put_character('%T')
30            actions.item(i).second.call([])
31            i := i + 1
32         end
33      end
34
35   say (something: STRING)
36      do
37         output.put_line(something)
38      end
39
40end