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

/test/language/unclassified/position/test_position3.e

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