/[eiffelstudio]/trunk/eweasel/tests/catcall004/test1.e
ViewVC logotype

Contents of /trunk/eweasel/tests/catcall004/test1.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 71016 - (show annotations)
Fri Nov 2 16:16:48 2007 UTC (12 years, 2 months ago) by manus
File size: 833 byte(s)
Added more catcall checker tests.

1 class TEST1 [G -> A create default_create end]
2
3 create
4 make
5
6 feature
7
8 make is
9 do
10 create {ARRAYED_LIST [G]} arrayed_list.make (10)
11 end
12
13 feature -- Access
14
15 item: G
16 list: LIST [G]
17 arrayed_list: LIST [G]
18
19 feature -- Settings
20
21 set_lists (a_list1, a_list2: LIST [G]) is
22 do
23 create {ARRAYED_LIST [G]} list.make (1)
24 list.append (a_list1)
25 list.append (a_list2)
26 end
27
28 set_item (v: G) is
29 do
30 item := v
31 end
32
33 operate is
34 local
35 g: G
36 do
37 print ("Operating on a list of type " + list.generating_type.out + "%N")
38 list.extend (create {G})
39 list.extend (item)
40 from
41 list.start
42 until
43 list.after
44 loop
45 if list.item /= Void then
46 g ?= list.item
47 if g = Void then
48 print ("Catcall with ")
49 end
50 list.item.operate
51 end
52 list.forth
53 end
54 print ("%N")
55 end
56
57 end
58

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23