PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 7ms app.codeStats 0ms

/test/language/unclassified/test_pn1.e

http://github.com/tybor/Liberty
Specman e | 47 lines | 30 code | 10 blank | 7 comment | 1 complexity | cad3c69af638b277a22e2dd35077fafc MD5 | raw file
 1-----------------------------------------------------------------------------
 2note
 3   title       : "C Code Bug";
 4   cluster     : "";
 5   project     : "";
 6   copyright   : "";
 7   author      : "Philipp Niedermaier";
 8   original    : "08.12.99";
 9   version     : "1.0";
10-----------------------------------------------------------------------------
11
12class TEST_PN1
13-- From: "Philipp Niedermaier" <pn@cpg.de>
14
15create {}
16   make
17
18-----------------------------------------------------------------------------
19
20feature {}
21
22-----------------------------------------------------------------------------
23
24   make
25      local
26         point_array:     ARRAY[AUX_PN1]
27      do
28         create point_array.make (0, 1)
29         c_code_bug (point_array)
30      end
31
32-----------------------------------------------------------------------------
33
34   c_code_bug (points_p:   ARRAY[AUX_PN1])
35      local
36         a:       REAL
37      do
38         if points_p.item (0).y < 0 then
39            a := points_p.item (0).x
40         elseif points_p.item (0).y < 0 then
41            a := points_p.item (0).x
42         end
43      end -- c_code_bug
44
45-----------------------------------------------------------------------------
46
47end