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

Contents of /trunk/eweasel/tests/catcall004/test.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: 2929 byte(s)
Added more catcall checker tests.

1 class TEST
2 create
3 make
4 feature
5
6 make is
7 local
8 ta: TEST1 [A]
9 tb: TEST1 [B]
10 tc: TEST1 [C]
11 tva: TEST1 [variant A]
12 tvb: TEST1 [variant B]
13 tvc: TEST1 [variant C]
14 la: LIST [A]
15 lb: LIST [B]
16 lc: LIST [C]
17 a: A
18 b: B
19 c: C
20 do
21 create a
22 create b
23 create c
24
25 -- create {ARRAYED_LIST [B]} la.make (1) -- Catcall conformance issue
26 la.extend (a)
27
28 create {ARRAYED_LIST [A]} la.make (1)
29 la.extend (a)
30 create {ARRAYED_LIST [B]} lb.make (1)
31 lb.extend (b)
32 create {ARRAYED_LIST [C]} lc.make (1)
33 lc.extend (c)
34
35 create ta.make
36 create tb.make
37 create tc.make
38
39 create tva.make
40 create tvb.make
41 create tvc.make
42
43 ta.arrayed_list.extend (a)
44 ta.arrayed_list.extend (b)
45 ta.arrayed_list.extend (c)
46
47 print ("List of " + ta.arrayed_list.generating_type.out + "%N")
48 ta.arrayed_list.do_all (agent (v: A)
49 do
50 if v /= Void then
51 print ("generating type is " + v.generating_type.out + "%N")
52 end
53 end)
54
55 -- tb.arrayed_list.extend (a) -- Rejected by normal conformance
56 tb.arrayed_list.extend (b)
57 -- tb.arrayed_list.extend (c) -- Rejected by normal conformance
58
59 -- tc.arrayed_list.extend (a) -- Rejected by normal conformance
60 -- tc.arrayed_list.extend (b) -- Rejected by normal conformance
61 tc.arrayed_list.extend (c)
62
63 ta.set_item (a)
64 ta.set_item (b)
65 ta.set_item (c)
66
67 ta.set_lists (la, la)
68 ta.operate
69
70 ta.set_lists (la, lb) -- Catcall conformance rejection
71 ta.operate
72
73 ta.set_lists (la, lc) -- Catcall conformance rejection
74 ta.operate
75
76 ta := tb -- Catcall conformance rejection
77 ta := tc -- Catcall conformance rejection
78 -- tb := tc -- Normal conformance rejection
79
80 tva := tvb
81 tva := tvc
82 -- tvb := tvc -- Normal conformance rejection
83
84 tva.arrayed_list.extend (a)
85 tva.arrayed_list.extend (b)
86 tva.arrayed_list.extend (c)
87
88 print ("List of " + tva.arrayed_list.generating_type.out + "%N")
89 from
90 tva.arrayed_list.start
91 until
92 tva.arrayed_list.after
93 loop
94 if tva.arrayed_list.item /= Void then
95 print ("generating type is " + tva.arrayed_list.item.generating_type.out + "%N")
96 end
97 tva.arrayed_list.forth
98 end
99
100 -- tvb.arrayed_list.extend (a) -- Rejected by normal conformance
101 tvb.arrayed_list.extend (b)
102 -- tvb.arrayed_list.extend (c) -- Rejected by normal conformance
103
104 -- tvc.arrayed_list.extend (a) -- Rejected by normal conformance
105 -- tvc.arrayed_list.extend (b) -- Rejected by normal conformance
106 tvc.arrayed_list.extend (c)
107
108 tva.set_item (a) -- Catcall rejection since variant
109 tva.set_item (b) -- Catcall rejection since variant
110 tva.set_item (c) -- Catcall rejection since variant
111
112 tva.set_lists (la, lb) -- Catcall rejection since variant
113 tva.operate
114
115 tva.set_lists (lb, lc) -- Catcall rejection since variant
116 tva.operate
117
118 tva.set_lists (lc, lb) -- Catcall rejection since variant
119 tva.operate
120 end
121
122 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23