blob: 44e2f9ca63744522298ba8b2c0d0bca6d532ee9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
class
TEST
create
run
feature {NONE} -- Initialization
run
local
base: BASE
derived: DERIVED
derived2: DERIVED2
ret: INTEGER
do
create base
create derived
create derived2
ret := derived.add10(100) -- works
--ret := derived2.add10(100) -- fails due to stronger preconditions
--ret := derived.add10(10) -- fails due to postcondition
ret := derived2.add10(10) -- works due to weaker postcondition
end
end
|