/[eiffelstudio]/trunk/eweasel/tests/runtime001/test.e
ViewVC logotype

Contents of /trunk/eweasel/tests/runtime001/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65297 - (show annotations)
Thu Nov 30 20:22:33 2006 UTC (13 years ago) by manus
File size: 832 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 class TEST
2
3 create
4 make
5
6 feature {NONE} -- Initialization
7
8 make is
9 do
10 create s.make (10)
11 resize
12 end
13
14 resize is
15 local
16 i: INTEGER
17 do
18 i := s.count
19 if 5 >= i then
20 if s = trigger_gc then
21 s := "TEST"
22 else
23 if is_forwarded (s) then
24 print ("Failure: object is marked with B_FWD.%N")
25 end
26 end
27 end
28 end
29
30 is_forwarded (a_string: STRING): BOOLEAN is
31 do
32 forwarded ($a_string, $Result)
33 end
34
35 forwarded (p: POINTER; b: TYPED_POINTER [BOOLEAN]) is
36 --
37 external
38 "C inline use %"eif_eiffel.h%""
39 alias
40 "[
41 #ifdef EIF_IL_DLL
42 *(EIF_BOOLEAN *) $b = EIF_FALSE;
43 #else
44 *(EIF_BOOLEAN *) $b = EIF_TEST(((union overhead *) $p -1)->ov_size & B_FWD);
45 #endif
46 ]"
47 end
48
49 s: STRING
50
51 trigger_gc: STRING is
52 local
53 mem: MEMORY
54 do
55 create mem
56 mem.collect
57 end
58
59 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23