PageRenderTime 123ms CodeModel.GetById 118ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/unclassified/jb/test_jb01.e

http://github.com/tybor/Liberty
Specman e | 91 lines | 60 code | 8 blank | 23 comment | 1 complexity | 27100146c4b9257fd3838b1f20484016 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_JB01
 5   -- From: Jacques Bouchard <bouchard@mageos.com>
 6
 7inherit
 8   AUX_JB01
 9      rename p as a_p
10      redefine x
11      end
12
13create {}
14   make
15
16feature {ANY}
17   x: TEST_JB01
18
19   p: STRING
20      do
21         Result := "TEST.p"
22      end
23
24   make
25      local
26         a: TEST_JB01; b: AUX_JB01; v1, v2: STRING
27      do
28         a := x
29         b := x
30         a := y
31         b := y
32         a := Current
33         b := Current
34         x := Current
35         y := Current
36         assert(x.p.is_equal(p))
37         assert(x.p.is_equal("TEST.p"))
38         v1 := y.p
39         v2 := p
40         assert(x = y)
41         assert(y = Current)
42         assert(y.generating_type.is_equal("TEST_JB01"))
43         assert(y.p.is_equal("TEST.p"))
44         assert(y.p.is_equal(p))
45         check
46            y = Current
47         end
48         v1 := y.p
49         assert(v1.is_equal("TEST.p"))
50         assert(y.p.is_equal("TEST.p"))
51         assert(generator.is_equal("TEST_JB01"))
52         assert(y.generator.is_equal("TEST_JB01"))
53         assert(x.generator.is_equal("TEST_JB01"))
54         a := Current
55         assert(a.p.is_equal("TEST.p"))
56      end
57
58   assert (boolean: BOOLEAN)
59      do
60         cpt := cpt + 1
61         if not boolean then
62            sedb_breakpoint
63            std_output.put_string("TEST_JB01: ERROR Test # ")
64            std_output.put_integer(cpt)
65            std_output.put_string("%N")
66         else
67            --std_output.put_string("Yes%N")
68         end
69      end
70
71   cpt: INTEGER
72
73end -- class TEST_JB01
74--
75-- ------------------------------------------------------------------------------------------------------------------------------
76-- Copyright notice below. Please read.
77--
78-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
79-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
80-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
81-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
82-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
83-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
84--
85-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
86-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
87--
88-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
89--
90-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
91-- ------------------------------------------------------------------------------------------------------------------------------