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

Annotation of /trunk/eweasel/tests/fixed118/test1.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (hide annotations)
Thu Nov 30 20:22:33 2006 UTC (13 years, 2 months ago) by manus
File size: 836 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
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
8     TEST1
9     feature
10    
11     violate_precondition (n: INTEGER) is
12     require
13     good_precondition: n > 100
14     do
15     end;
16    
17     violate_postcondition (n: INTEGER) is
18     do
19     ensure
20     good_postcondition: n > 100
21     end;
22    
23     violate_invariant (n: INTEGER) is
24     do
25     field := -1;
26     rescue
27     field := 0
28     end;
29    
30     violate_loop (n: INTEGER) is
31     local
32     k: INTEGER
33     do
34     from
35     k := 1;
36     variant
37     good_variant: 30 - k
38     until
39     k > 50
40     loop
41     k := k + 1;
42     end;
43     end;
44    
45     violate_check (n: INTEGER) is
46     do
47     check
48     enough_weasels: n < 0
49     end
50     end;
51    
52     field: INTEGER;
53    
54     invariant
55     good_invariant: field >= 0;
56     end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23