directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee" <trus...@gmail.com>
Subject Re: svn commit: r485050 - /directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/
Date Tue, 12 Dec 2006 01:58:45 GMT
On 12/10/06, elecharny@apache.org <elecharny@apache.org> wrote:
>
> Author: elecharny
> Date: Sat Dec  9 11:31:38 2006
> New Revision: 485050
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=485050
> Log:
> Added some SC tests, and fixed a buggy test


<snip/>

Added:
> directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/Ia5StringSyntaxCheckerTest.java
> URL:
> http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/Ia5StringSyntaxCheckerTest.java?view=auto&rev=485050
>
> ==============================================================================
> ---
> directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/Ia5StringSyntaxCheckerTest.java
> (added)
> +++
> directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/Ia5StringSyntaxCheckerTest.java
> Sat Dec  9 11:31:38 2006


<snip/>

+public class Ia5StringSyntaxCheckerTest extends TestCase
> +{


<snip/>

+    public void testWrongCase()
> +    {
> +        assertFalse( checker.isValidSyntax( "Ž" ) );
> +        assertFalse( checker.isValidSyntax( "¤" ) );
> +        assertFalse( checker.isValidSyntax( "" ) );
> +        assertFalse( checker.isValidSyntax( "" ) );
> +        assertFalse( checker.isValidSyntax( "ˆ" ) );
> +        assertFalse( checker.isValidSyntax( "¡" ) );
> +        assertFalse( checker.isValidSyntax( "" ) );
> +        assertFalse( checker.isValidSyntax( "£" ) );
> +        assertFalse( checker.isValidSyntax( "Û" ) );
> +        assertFalse( checker.isValidSyntax( "«" ) );
> +        assertFalse( checker.isValidSyntax( "ã" ) );
> +    }


Characters other than US-ASCII will make the code uncompilable.  The default
system encoding of my Eclipse is UTF-8, so it denies to compile it.  You
could use '\uxxxx' syntax instead to make sure the code is compiled and the
compiled byte code is identical across different systems.
PrintableStringSyntaxCheckTest also has the same problem.  I tried to fix
this problem by replacing these special characters into '\uxxxx' expression,
but I couldn't find any easy way to get the unicode value of each character
and am afraid that I might break the test case.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Mime
View raw message