/[eiffelstudio]/trunk/eweasel/tests/scoop021/a.e
ViewVC logotype

Contents of /trunk/eweasel/tests/scoop021/a.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 97344 - (show annotations)
Fri May 22 12:16:41 2015 UTC (4 years, 8 months ago) by alexk
File size: 888 byte(s)
Corrected checks for expected object test result that may fail when a target type is not separate.
1 class A [S, T]
2
3 create
4 make
5
6 feature {NONE} -- Creation
7
8 make (a: S; b: BOOLEAN; i: INTEGER)
9 local
10 t: detachable T
11 s: detachable separate T
12 do
13 -- Object test.
14 assert (attached a, i)
15 assert (b = attached {T} a, i + 1)
16 assert (attached {separate T} a, i + 2)
17 assert (attached a as x, i + 3)
18 assert (b = attached {T} a as x, i + 4)
19 assert (attached {separate T} a as x, i + 5)
20 -- Reverse assignment.
21 t ?= a; assert (b = attached t, i + 6)
22 s ?= a; assert (attached s, i + 7)
23 end
24
25 feature {NONE} -- Output
26
27 assert (b: BOOLEAN; i: INTEGER)
28 -- Report whether test `i' is successful according to `b'.
29 do
30 io.put_string ("Test #")
31 io.put_integer (i)
32 io.put_string (": ")
33 if b then
34 io.put_string ("OK")
35 else
36 io.put_string ("FAILED")
37 end
38 io.put_character ('.')
39 io.put_new_line
40 end
41
42 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23