/[eiffelstudio]/branches/eth/eve/eweasel/tests/exec283/test.e
ViewVC logotype

Contents of /branches/eth/eve/eweasel/tests/exec283/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 83441 - (show annotations)
Sat Jun 5 13:52:53 2010 UTC (9 years, 7 months ago) by jasonw
File size: 4643 byte(s)
Renamed branch eve3 to eve. The eve branch serves as the new branch for the EVE project.
1 class TEST
2
3 create
4 make
5
6 feature
7 make
8 local
9 l_n8: SPECIAL [NATURAL_64]
10 l_n4: SPECIAL [NATURAL_32]
11 l_n2: SPECIAL [NATURAL_16]
12 l_n1: SPECIAL [NATURAL_8]
13 l_i8: SPECIAL [INTEGER_64]
14 l_i4: SPECIAL [INTEGER_32]
15 l_i2: SPECIAL [INTEGER_16]
16 l_i1: SPECIAL [INTEGER_8]
17 l_b: SPECIAL [BOOLEAN]
18 l_c4: SPECIAL [CHARACTER_32]
19 l_c1: SPECIAL [CHARACTER_8]
20 l_p: SPECIAL [POINTER]
21 l_r8: SPECIAL [REAL_64]
22 l_r4: SPECIAL [REAL_32]
23 l_a: SPECIAL [detachable ANY]
24 l_exp1: SPECIAL [EXP1]
25 l_exp2: SPECIAL [EXP2]
26 l_exp3: SPECIAL [EXP3]
27 l_exp4: SPECIAL [EXP4]
28 l_exp5: SPECIAL [EXP5 [STRING]]
29 l_exp6: SPECIAL [EXP6 [STRING]]
30 l_exp7: SPECIAL [EXP7]
31 exp1: EXP1
32 exp2: EXP2
33 exp3: EXP3
34 exp4: EXP4
35 exp5: EXP5 [STRING]
36 exp6: EXP6 [STRING]
37 exp7: EXP7
38 do
39 create l_n8.make_filled (0, 10)
40 create l_n4.make_filled (0, 10)
41 create l_n2.make_filled (0, 10)
42 create l_n1.make_filled (0, 10)
43 create l_i8.make_filled (0, 10)
44 create l_i4.make_filled (0, 10)
45 create l_i2.make_filled (0, 10)
46 create l_i1.make_filled (0, 10)
47 create l_b.make_filled (False, 10)
48 create l_c4.make_filled ('%/000/', 10)
49 create l_c1.make_filled ('%/000/', 10)
50 create l_p.make_filled (default_pointer, 10)
51 create l_r8.make_filled (0.0, 10)
52 create l_r4.make_filled ({REAL_32} 0.0, 10)
53 create l_a.make_filled (Void, 10)
54 create l_exp1.make_filled (exp1, 10)
55 create l_exp2.make_filled (exp2, 10)
56 create l_exp3.make_filled (exp3, 10)
57 create l_exp4.make_filled (exp4, 10)
58 create l_exp5.make_filled (exp5, 10)
59 create l_exp6.make_filled (exp6, 10)
60 create l_exp7.make_filled (exp7, 10)
61
62 display_info (l_n8)
63 display_info (l_n4)
64 display_info (l_n2)
65 display_info (l_n1)
66 display_info (l_i8)
67 display_info (l_i4)
68 display_info (l_i2)
69 display_info (l_i1)
70 display_info (l_b)
71 display_info (l_c4)
72 display_info (l_c1)
73 display_info (l_p)
74 display_info (l_r8)
75 display_info (l_r4)
76 display_info (l_a)
77 display_info (l_exp1)
78 display_info (l_exp2)
79 display_info (l_exp3)
80 display_info (l_exp4)
81 display_info (l_exp5)
82 display_info (l_exp6)
83 display_info (l_exp7)
84
85 l_n8.fill_with (0, 0, 9)
86 l_n4.fill_with (0, 0, 9)
87 l_n2.fill_with (0, 0, 9)
88 l_n1.fill_with (0, 0, 9)
89 l_i8.fill_with (0, 0, 9)
90 l_i4.fill_with (0, 0, 9)
91 l_i2.fill_with (0, 0, 9)
92 l_i1.fill_with (0, 0, 9)
93 l_b.fill_with (False, 0, 9)
94 l_c4.fill_with ('%/000/', 0, 9)
95 l_c1.fill_with ('%/000/', 0, 9)
96 l_p.fill_with (default_pointer, 0, 9)
97 l_r8.fill_with (0.0, 0, 9)
98 l_r4.fill_with ({REAL_32} 0.0, 0, 9)
99 l_a.fill_with (Void, 0, 9)
100 l_exp1.fill_with (exp1, 0, 9)
101 l_exp2.fill_with (exp2, 0, 9)
102 l_exp3.fill_with (exp3, 0, 9)
103 l_exp4.fill_with (exp4, 0, 9)
104 l_exp5.fill_with (exp5, 0, 9)
105 l_exp6.fill_with (exp6, 0, 9)
106 l_exp7.fill_with (exp7, 0, 9)
107
108 display_info (l_n8)
109 display_info (l_n4)
110 display_info (l_n2)
111 display_info (l_n1)
112 display_info (l_i8)
113 display_info (l_i4)
114 display_info (l_i2)
115 display_info (l_i1)
116 display_info (l_b)
117 display_info (l_c4)
118 display_info (l_c1)
119 display_info (l_p)
120 display_info (l_r8)
121 display_info (l_r4)
122 display_info (l_a)
123 display_info (l_exp1)
124 display_info (l_exp2)
125 display_info (l_exp3)
126 display_info (l_exp4)
127 display_info (l_exp5)
128 display_info (l_exp6)
129 display_info (l_exp7)
130
131 check_all_default (l_n8, 0)
132 check_all_default (l_n4, 0)
133 check_all_default (l_n2, 0)
134 check_all_default (l_n1, 0)
135 check_all_default (l_i8, 0)
136 check_all_default (l_i4, 0)
137 check_all_default (l_i2, 0)
138 check_all_default (l_i1, 0)
139 check_all_default (l_b, False)
140 check_all_default (l_c4, '%/000/')
141 check_all_default (l_c1, '%/000/')
142 check_all_default (l_p, default_pointer)
143 check_all_default (l_r8, 0.0)
144 check_all_default (l_r4, 0.0)
145 check_all_default (l_a, Void)
146 check_all_default (l_exp1, exp1)
147 check_all_default (l_exp2, exp2)
148 check_all_default (l_exp3, exp3)
149 check_all_default (l_exp4, exp4)
150 check_all_default (l_exp5, exp5)
151 check_all_default (l_exp6, exp6)
152 check_all_default (l_exp7, exp7)
153 end
154
155 display_info (a_spec: SPECIAL [ANY])
156 require
157 a_spec_not_void: a_spec /= Void
158 do
159 print (a_spec.generating_type.out)
160 print (" has ")
161 print (a_spec.count)
162 print (" elements.%N")
163 end
164
165 check_all_default (a_spec: SPECIAL [ANY]; a_def: ANY)
166 require
167 a_spec_not_void: a_spec /= Void
168 do
169 if not a_spec.filled_with (a_def, a_spec.lower, a_spec.upper) then
170 print (a_spec.generating_type.out)
171 print (" does not have all default elements.%N")
172 end
173 end
174
175 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23