/[eiffelstudio]/trunk/eweasel/tests/anchor009/test_rev1.e
ViewVC logotype

Contents of /trunk/eweasel/tests/anchor009/test_rev1.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 83207 - (show annotations)
Mon May 17 09:47:26 2010 UTC (9 years, 4 months ago) by alexk
File size: 949 byte(s)
Removed unused code, made code void-safe and ensured the feature of interest is called.
1 class
2 TEST
3
4 inherit
5 COMPARABLE
6
7 create
8 make
9
10 feature {NONE} -- Creation
11
12 make
13 do
14 if Current < Current then
15 domain := Current.domain
16 end
17 end
18
19 feature
20
21 domain: detachable TEST1 [CHARACTER]
22
23 feature -- Comparison
24
25 is_less alias "<" (other: like Current): BOOLEAN
26 -- Is current object less than `other'?
27 local
28 cursor, other_cursor: like domain.new_cursor
29 exit: BOOLEAN
30 do
31 if attached domain as d and then attached other and then attached other.domain as other_domain then
32 from
33 cursor := d.new_cursor
34 other_cursor := other_domain.new_cursor
35 until
36 exit or cursor.after or other_cursor.after
37 loop
38 if cursor.item < other_cursor.item then
39 result := true
40 exit := true
41 elseif other_cursor.item < cursor.item then
42 result := false
43 exit := true
44 end
45 end
46 if not exit then
47 result := (cursor.after and not other_cursor.after)
48 end
49 end
50 end
51
52 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23