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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (show annotations)
Thu Nov 30 20:22:33 2006 UTC (13 years ago) by manus
File size: 841 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
2 --| Copyright (c) 1993-2006 University of Southern California and contributors.
3 --| All rights reserved.
4 --| Your use of this work is governed under the terms of the GNU General
5 --| Public License version 2.
6
7 class TEST
8 creation
9 make
10 feature
11
12 make (args: ARRAY [STRING]) is
13 local
14 item_count: INTEGER;
15 seed: INTEGER;
16 list: M_ARRAYED_LIST [INTEGER];
17 do
18 item_count := args.item (1).to_integer;
19 seed := args.item (2).to_integer;
20 list := new_list (item_count, seed);
21 list.process;
22 list.process;
23 end;
24
25 new_list (item_count, seed: INTEGER): M_ARRAYED_LIST [INTEGER] is
26 local
27 r: RANDOM;
28 k: INTEGER;
29 do
30 !!r.set_seed (seed);
31 from
32 k := 1;
33 !!Result.make (item_count);
34 r.start;
35 until
36 k > item_count
37 loop
38 Result.extend (r.item);
39 r.forth;
40 k := k + 1;
41 end
42 end;
43
44 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23