/[eiffelstudio]/trunk/eweasel/tests/utf003/test.e
ViewVC logotype

Contents of /trunk/eweasel/tests/utf003/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 101648 - (show annotations)
Wed Apr 11 13:54:52 2018 UTC (19 months, 1 week ago) by alexk
File size: 968 byte(s)
Added an example for bug#19436.
1 class TEST
2
3 create
4 make
5
6 feature {NONE} -- Creation
7
8 make
9 -- Run test.
10 local
11 u: UTF_CONVERTER
12 do
13 report (1, u.is_valid_utf_16 (({ARRAY [NATURAL_16]} <<>>).area))
14 report (2, u.is_valid_utf_16 (({ARRAY [NATURAL_16]} <<0>>).area))
15 report (3, not u.is_valid_utf_16 (({ARRAY [NATURAL_16]} <<0, 0xD800>>).area))
16 report (4, u.is_valid_utf_16 (({ARRAY [NATURAL_16]} <<1>>).area))
17 report (5, not u.is_valid_utf_16 (({ARRAY [NATURAL_16]} <<1, 0xDC00>>).area))
18 report (6, u.is_valid_utf_16 (({ARRAY [NATURAL_16]} <<0xD7FF>>).area))
19 report (7, not u.is_valid_utf_16 (({ARRAY [NATURAL_16]} <<0xD800>>).area))
20 end
21
22 feature {NONE} -- Output
23
24 report (test_number: NATURAL_32; value: BOOLEAN)
25 -- Check whether `value` is true and print an approprite result mesage for test `test_number`.
26 do
27 io.put_string ("Test #")
28 io.put_natural_32 (test_number)
29 io.put_string (if value then ": OK" else ": Failed" end)
30 io.put_new_line
31 end
32
33 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23