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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (hide annotations)
Thu Nov 30 20:22:33 2006 UTC (12 years, 10 months ago) by manus
File size: 937 byte(s)
Moved from trunk/Src/eweasel to trunk/eweasel so that a simple checkout of the source code is not penalized by the lenghty process of checking out all the tests of eweasel.
1 manus 65296 class
2     TEST
3    
4     create
5    
6     make
7    
8     feature {NONE} -- Initialization
9    
10     make is
11     -- Execute test.
12     do
13     create l.make_from_array (<<1, 2, 3, 4, 5>>)
14     Io.put_string ("Before: ")
15     output_list
16     l.go_i_th (5)
17     l.remove
18     Io.put_string ("After removing 5: ")
19     output_list
20     create l.make_from_array (<<1, 2, 3, 4, 5>>)
21     Io.put_string ("Before: ")
22     output_list
23     l.go_i_th (3)
24     l.remove
25     Io.put_string ("After removing 3: ")
26     output_list
27     create l.make_from_array (<<1, 2, 1, 2, 3, 2, 1, 4, 1>>)
28     Io.put_string ("Before: ")
29     output_list
30     l.prune_all (1)
31     Io.put_string ("After pruning all 1's: ")
32     output_list
33     end
34    
35     feature {NONE} -- Implementation
36    
37     l: ARRAYED_LIST [INTEGER]
38    
39     output_list is
40     -- Output list.
41     do
42     from
43     l.start
44     until
45     l.after
46     loop
47     Io.put_integer (l.item)
48     if not l.islast then Io.put_string (", ") end
49     l.forth
50     end
51     Io.put_new_line
52     end
53    
54     end -- class TEST

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23