diff options
Diffstat (limited to 'eiffel-fragen/replaceability/derived.e')
| -rw-r--r-- | eiffel-fragen/replaceability/derived.e | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/eiffel-fragen/replaceability/derived.e b/eiffel-fragen/replaceability/derived.e index 9a409bd..b13300f 100644 --- a/eiffel-fragen/replaceability/derived.e +++ b/eiffel-fragen/replaceability/derived.e | |||
| @@ -14,12 +14,15 @@ feature | |||
| 14 | do | 14 | do |
| 15 | RESULT := num + 10 | 15 | RESULT := num + 10 |
| 16 | ensure then | 16 | ensure then |
| 17 | -- my postcondition | 17 | derived_result_equals_mypostcondition: mypostcondition(RESULT) |
| 18 | derived_result_equals_myresult: RESULT = myresult | ||
| 19 | end | 18 | end |
| 20 | 19 | ||
| 21 | myresult: INTEGER | 20 | -- my postcondition |
| 21 | mypostcondition(num: INTEGER): BOOLEAN | ||
| 22 | do | 22 | do |
| 23 | RESULT := 110 | 23 | Result := false |
| 24 | if num = 110 then | ||
| 25 | Result := true | ||
| 26 | end | ||
| 24 | end | 27 | end |
| 25 | end | 28 | end |
