PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/unclassified/test_eg3.e

http://github.com/tybor/Liberty
Specman e | 65 lines | 36 code | 6 blank | 23 comment | 1 complexity | c992ad76498e95a0d5aeca04e666521c MD5 | raw file
 1-- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries.
 2-- See the Copyright notice at the end of this file.
 3--
 4class TEST_EG3
 5   -- From a bug report of Enrico GOBBETTI
 6
 7create {}
 8   make
 9
10feature {ANY}
11   a4: AUX_EG3_B
12
13   make
14      local
15         a1, a2, a3: AUX_EG3_B
16      do
17         a1.set_x(1.0)
18         a2.set_x(2.0)
19         a3 := a1 + a2
20         assert(a1.x = 1.0)
21         assert(a2.x = 2.0)
22         assert(a1.x + a2.x = 3.0)
23         assert(a3.x = 3.0)
24         create a3
25         assert(a3.x = 0.0)
26         a4 := a2
27         assert(a4.x = 2.0)
28         assert(a4 = a2)
29         create a4
30         assert(a4.x = 0.0)
31      end
32
33   assert (b: BOOLEAN)
34      do
35         cpt := cpt + 1
36         if not b then
37            std_output.put_string("TEST_EG3: ERROR Test # ")
38            std_output.put_integer(cpt)
39            std_output.put_string("%N")
40         else
41            -- std_output.put_string("Yes%N");
42         end
43      end
44
45   cpt: INTEGER
46
47end -- class TEST_EG3
48--
49-- ------------------------------------------------------------------------------------------------------------------------------
50-- Copyright notice below. Please read.
51--
52-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
53-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
54-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
55-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
56-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
57-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
58--
59-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
60-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
61--
62-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
63--
64-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
65-- ------------------------------------------------------------------------------------------------------------------------------