/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
- class TEST_AGENT68
- insert
- EIFFELTEST_TOOLS
- create {}
- make
- feature {}
- output: NULL_OUTPUT_STREAM
- once
- create Result
- end
- make
- local
- actions: FAST_ARRAY[TUPLE[STRING, PROCEDURE[TUPLE]]]
- i: INTEGER
- do
- create actions.make(0)
- actions.add_last(["one", agent say("hello")])
- actions.add_last(["two", agent say("world")])
- from
- i := actions.lower
- until
- i > actions.upper
- loop
- output.put_string(actions.item(i).first)
- output.put_character('%T')
- actions.item(i).second.call([])
- i := i + 1
- end
- end
- say (something: STRING)
- do
- output.put_line(something)
- end
- end