PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/test/lib/string/test_character4.e

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