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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 99984 - (hide annotations)
Fri Mar 17 18:43:27 2017 UTC (2 years, 6 months ago) by alexk
File size: 991 byte(s)
Improved tests by removing unexpected qualified feature calls.
1 alexk 99822 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 alexk 99984 -- No qualified calls can be made, only reference comparison and boolean tests.
21     check f = Void then end
22 alexk 99822 a := Current
23     end
24    
25 alexk 99959 feature {NONE} -- Initialization
26 alexk 99822
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 alexk 99959 feature {TEST} -- Access
44 alexk 99822
45     a: TEST
46     -- An attribute to be initialized at creation.
47    
48 alexk 99959 feature {NONE} -- Access
49    
50 alexk 99822 f: TEST
51 alexk 99959 -- A once function returning an incompletely initialized object.
52 alexk 99822 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