/[eiffelstudio]/branches/eth/eve/eweasel/tests/exec287/test.e
ViewVC logotype

Contents of /branches/eth/eve/eweasel/tests/exec287/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 83441 - (show annotations)
Sat Jun 5 13:52:53 2010 UTC (9 years, 7 months ago) by jasonw
File size: 1247 byte(s)
Renamed branch eve3 to eve. The eve branch serves as the new branch for the EVE project.
1 class TEST
2 create
3 make
4
5 feature
6
7 test: TUPLE [ b: BOOLEAN; i: ANY ]
8
9 make is
10 do
11 create test
12 create last_original
13 create last_translated
14
15 test.b := False -- Works
16 test.i := ({ANY}).attempt (7) -- Works
17 test.i := 7 -- Segmentation violation; Operating system signal
18 test.i := True -- Segmentation violation; Operating system signal
19
20 get_original_entries (2)
21 get_translated_entries (4)
22 end
23
24 last_original: TUPLE [i:INTEGER; list: LIST[STRING_32]]
25 last_translated: TUPLE [i:INTEGER; list: LIST[STRING_32]]
26
27 get_original_entries (i_th: INTEGER) is
28 -- get `i_th' original entry in the file
29 do
30 if (last_original.i /= i_th) then
31 last_original.i := i_th
32 last_original.list := extract_string (1, 3).split('%U')
33 end
34 ensure
35 last_original.list = Void or last_original.list /= Void
36 end
37
38 get_translated_entries (i_th: INTEGER) is
39 -- What's the `i-th' translated entry?
40 do
41 if (last_translated.i /= i_th) then
42 last_translated.i := i_th
43 last_translated.list := extract_string (1, 3).split('%U')
44 end
45 ensure
46 last_translated.list = Void or last_translated.list /= Void
47 end
48
49 extract_string (a_offset, a_number: INTEGER): STRING_32 is
50 do
51 create Result.make (10)
52 end
53
54 end

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23