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

Contents of /trunk/eweasel/tests/final011/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: 1023 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 inherit
9 EXCEPTIONS
10
11 creation
12
13 make
14 feature
15
16 make is
17 local
18 tried: BOOLEAN;
19 do
20 if not tried then
21 print (compare ('a', 'b', False)); io.new_line;
22 end
23 rescue
24 tried := True;
25 io.put_string ("In make rescue clause%N");
26 retry;
27 end;
28
29 compare (c1, c2: CHARACTER; flag: BOOLEAN): BOOLEAN is
30 local
31 s: STRING;
32 tried: BOOLEAN;
33 do
34 if not tried then
35 !!s.make (0);
36 s.append ("wimp");
37 if flag then
38 Result := c1 = c2;
39 else
40 Result := caseless_char_eq(c1, c2);
41 end;
42 end
43 rescue
44 io.put_string ("In compare rescue clause - string is ");
45 io.put_string (s); io.new_line;
46 tried := True;
47 retry;
48 end;
49
50 caseless_char_eq (c1, c2:CHARACTER): BOOLEAN is
51 do
52 io.put_string ("Raising exception%N");
53 raise("weasels");
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