PageRenderTime 25ms CodeModel.GetById 19ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/test/lib/string/test_character1.e

http://github.com/tybor/Liberty
Specman e | 74 lines | 49 code | 4 blank | 21 comment | 0 complexity | 8619a715506c4186f06b485f3e038fc8 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_CHARACTER1
 5
 6insert
 7   EIFFELTEST_TOOLS
 8
 9create {}
10   make
11
12feature {ANY}
13   make
14      do
15         assert('a' = 'a')
16         assert('a' < 'b')
17         assert('a' <= 'b')
18         assert('b' <= 'b')
19         assert('a'.to_upper = 'A')
20         assert('z'.to_upper = 'Z')
21         assert('+'.to_upper = '+')
22         assert('A'.to_lower = 'a')
23         assert('Z'.to_lower = 'z')
24         assert('+'.to_lower = '+')
25         assert('0'.is_digit)
26         assert('1'.is_digit)
27         assert('2'.is_digit)
28         assert('3'.is_digit)
29         assert('4'.is_digit)
30         assert('5'.is_digit)
31         assert('6'.is_digit)
32         assert('7'.is_digit)
33         assert('8'.is_digit)
34         assert('9'.is_digit)
35         assert(not 'x'.is_digit)
36         assert('0'.value = 0)
37         assert('1'.value = 1)
38         assert('2'.value = 2)
39         assert('3'.value = 3)
40         assert('4'.value = 4)
41         assert('5'.value = 5)
42         assert('6'.value = 6)
43         assert('7'.value = 7)
44         assert('8'.value = 8)
45         assert('9'.value = 9)
46         assert('a'.code = 97)
47         assert('z'.code = 122)
48         assert('A'.code = 65)
49         assert('Z'.code = 90)
50         assert('%/127/'.code = 127)
51         assert('%/128/'.code = 128)
52         assert('%/254/'.code = 254)
53         assert('%/255/'.code = 255)
54      end
55
56end -- class TEST_CHARACTER1
57--
58-- ------------------------------------------------------------------------------------------------------------------------------
59-- Copyright notice below. Please read.
60--
61-- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
62-- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
63-- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
64-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
65-- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
66-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
67--
68-- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P.       - University of Nancy 1 - FRANCE
69-- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
70--
71-- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
72--
73-- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
74-- ------------------------------------------------------------------------------------------------------------------------------