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

Contents of /trunk/eweasel/tests/attach124/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 99984 - (show annotations)
Fri Mar 17 18:43:27 2017 UTC (2 years, 7 months ago) by alexk
File size: 991 byte(s)
Improved tests by removing unexpected qualified feature calls.
1 class TEST
2
3 create
4 make,
5 make_uninitialized
6
7 feature {NONE} -- Creation
8
9 make
10 -- Run test.
11 do
12 set_a
13 io.put_string (f.a.out)
14 end
15
16 make_uninitialized
17 -- Raise an exception after registering a new object in a once function
18 -- and before it is completely initialized.
19 do
20 -- No qualified calls can be made, only reference comparison and boolean tests.
21 check f = Void then end
22 a := Current
23 end
24
25 feature {NONE} -- Initialization
26
27 set_a
28 -- Set attribute `a` with a side effect of initializing
29 -- a once function `f` with an incompleetely initialized object.
30 local
31 is_retried: BOOLEAN
32 do
33 if is_retried then
34 a := Current
35 else
36 create a.make_uninitialized
37 end
38 rescue
39 is_retried := True
40 retry
41 end
42
43 feature {TEST} -- Access
44
45 a: TEST
46 -- An attribute to be initialized at creation.
47
48 feature {NONE} -- Access
49
50 f: TEST
51 -- A once function returning an incompletely initialized object.
52 once
53 Result := Current
54 end
55
56 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23