This is the mail archive of the
mailing list for the Mauve project.
Re: new test cases (long)
-----BEGIN PGP SIGNED MESSAGE-----
On Sunday 16 February 2003 22:53, Mark Wielaard wrote:
> Hi Raif,
> Thanks for all the pointers. The character encoding names seem to be
> confusing whatever way you look at it. What is and isn't a canonical
> name, for what package, what the (historical) alias is, etc is
> difficult to decipher.
i agree it's somewhat confusing but we can reduce this by sticking to
the documentation and the behaviour of the implementation (sun's jdk
> Also note that the 1.4 docs and 1.4.1 encoding docs actually list
> different canonical names... Duh...
where exactly does the 1.4 and the 1.4.1 differ?
> Anyway I think the best thing todo is to add all canonical,
> historical and/or alias must support character names to the
> getBytes() tests, at least for the names that are documented on all
> these different (versions) of the API/Spec pages. The distinction
> between names used for java.lang/io and java.nio seems to only
> confuse matters and
> implementations that only support some names for some of the library
> classes will probably confuse users enormously.
another alternative is to stick to the distinction the javadocs makes
wrt. to the following aspects:
* specific packages use specific, albeit sometimes, different
* some names are "canonical" others are "aliases,"
* some names are a MUST (Basic), others (the international version of
the JDK) are a MAY (Extended).
this way, gnu.testlet.java.lang.String.getBytes can be the test point
for java.lang.* API encoding names, and something like (a new)
gnu.testlet.java.nio.charset.Charset.isSupported test would emulate the
same for the java.nio.* API encoding names.
> So getBytes14 now tests US-ASCII, windows-1252, ISO-8859-1,
> ISO-8859-15, ISO8859_15, UTF-16BE and UTF-16LE. Together with the
> getBytes13 tests this should catch all the encoding names that people
> will probaly always expect to be available in a normal class library
if my comments above are acceptable, i can revise the getBytes classes
to handle distinctly the last 2 points (canonical v/s alias, and basic
v/s extended), and write a new test case for java.nio.* API
conformance. the pass/fail requirements can then be controlled with an
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique
-----END PGP SIGNATURE-----