PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/test/language/instruction/precursor/test_precursor21.e

http://github.com/tybor/Liberty
Specman e | 54 lines | 25 code | 6 blank | 23 comment | 0 complexity | bb2fe7c6f93295b5b4e3024e2e8769f5 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_PRECURSOR21
 5   --
 6   -- The Precursor is some external feature.
 7
 8inherit
 9   AUX_PRECURSOR21
10      redefine
11         foo
12      end
13
14insert
15   EIFFELTEST_TOOLS
16
17create {}
18   main
19
20feature {}
21   main
22      local
23         pointer: POINTER
24      do
25         assert(pointer.is_null)
26         pointer := foo(3)
27         assert(pointer.is_not_null)
28         assert(not pointer.is_null)         
29      end
30   
31   foo (size: INTEGER): POINTER
32      do
33         Result := Precursor(size)
34      end
35
36end -- class TEST_PRECURSOR21
37--
38-- ------------------------------------------------------------------------------------------------------------------------------
39-- Copyright notice below. Please read.
40--
41-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
42-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
43-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
44-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
45-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
46-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
47--
48-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
49-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
50--
51-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
52--
53-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
54-- ------------------------------------------------------------------------------------------------------------------------------