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

Contents of /trunk/eweasel/tests/fixed118/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: 1680 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 -- To reproduce problems.
8 -- Compile classes as is.
9 -- Finish_freezing.
10 -- Run `test'.
11 class
12 TEST
13 creation
14 make
15 feature
16
17 make is
18 local
19 x: TEST1;
20 retrying: BOOLEAN;
21 next: INTEGER;
22 do
23 if not retrying then
24 !!x;
25 next := preconditions;
26 end;
27 if next = preconditions then
28 io.putstring ("Calling violate_precondition%N");
29 x.violate_precondition (6);
30 io.putstring ("Precondition violation not detected%N");
31 next := next + 1;
32 end;
33 if next = postconditions then
34 io.putstring ("Calling violate_postcondition%N");
35 x.violate_postcondition (5);
36 io.putstring ("Postcondition violation not detected%N");
37 next := next + 1;
38 end;
39 if next = invariants then
40 io.putstring ("Calling violate_invariant%N");
41 x.violate_invariant (4);
42 io.putstring ("Invariant violation not detected%N");
43 next := next + 1;
44 end;
45 if next = loops then
46 io.putstring ("Calling violate_loop%N");
47 x.violate_loop (3);
48 io.putstring ("Loop variant violation not detected%N");
49 next := next + 1;
50 end;
51 if next = checks then
52 io.putstring ("Calling violate_check%N");
53 x.violate_check (2);
54 io.putstring ("Check assertion violation not detected%N");
55 next := next + 1;
56 end
57 rescue
58 retrying := True;
59 next := next + 1;
60 io.putstring ("Assertion violation detected%N");
61 retry;
62 end;
63
64 preconditions, postconditions, invariants, loops, checks: INTEGER is unique;
65
66 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23