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

/test/language/simplify/test_simplify08.e

http://github.com/tybor/Liberty
Specman e | 66 lines | 34 code | 10 blank | 22 comment | 3 complexity | 7288846373967524f47ed1d05df78245 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_SIMPLIFY08
 5   -- To test simplify of the ?:= operator
 6
 7inherit
 8   EIFFELTEST_TOOLS
 9
10create {}
11   make
12
13feature {ANY}
14   string: STRING
15
16   animal: ANIMAL
17
18   cat: CAT
19
20   dog: DOG
21
22   any: ABSTRACT_STRING
23
24   bs: EIFFELTEST_TOOLS
25
26   make
27      local
28         c: like Current
29      do
30         any := "toto"
31         bs := Current
32         if not (c ?:= bs) then
33            c_inline_c("simplify error #1 in boost_simplify08")
34         end
35         create cat
36         animal := cat
37         if cat ?:= animal then
38            cat ::= animal
39            assert(cat = animal)
40         else
41            c_inline_c("simplify error #2 in boost_simplify08")
42         end
43         if dog ?:= animal then
44            assert(False)
45         end
46      end
47
48end -- class TEST_SIMPLIFY08
49--
50-- ------------------------------------------------------------------------------------------------------------------------------
51-- Copyright notice below. Please read.
52--
53-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
54-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
55-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
56-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
57-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
58-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
59--
60-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
61-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
62--
63-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
64--
65-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
66-- ------------------------------------------------------------------------------------------------------------------------------