blob: 09a08214be2b8dc88166088cb4c4694648f4e86d (
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 precondition
ret := derived2.add10(10) -- works due to weaker preconditions
end
end
|