directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r577361 - in /directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax: JavaByteSyntaxCheckerTest.java JavaIntegerSyntaxCheckerTest.java JavaLongSyntaxCheckerTest.java JavaShortSyntaxCheckerTest.java
Date Wed, 19 Sep 2007 16:48:48 GMT
Author: elecharny
Date: Wed Sep 19 09:48:46 2007
New Revision: 577361

URL: http://svn.apache.org/viewvc?rev=577361&view=rev
Log:
Removed the ^M

Modified:
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaByteSyntaxCheckerTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaIntegerSyntaxCheckerTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaLongSyntaxCheckerTest.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaShortSyntaxCheckerTest.java

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaByteSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaByteSyntaxCheckerTest.java?rev=577361&r1=577360&r2=577361&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaByteSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaByteSyntaxCheckerTest.java
Wed Sep 19 09:48:46 2007
@@ -1,94 +1,94 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.shared.ldap.schema.syntax;
-
-import junit.framework.TestCase;
-
-/**
- * Test cases for JavaByteSyntaxChecker.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
- */
-public class JavaByteSyntaxCheckerTest extends TestCase
-{
-    JavaByteSyntaxChecker checker = new JavaByteSyntaxChecker();
-
-
-    public void testNullString()
-    {
-        assertFalse( checker.isValidSyntax( null ) );
-    }
-
-
-    public void testEmptyString()
-    {
-        assertFalse( checker.isValidSyntax( "" ) );
-    }
-
-
-    public void testOneCharString()
-    {
-        assertFalse( checker.isValidSyntax( "f" ) );
-        assertFalse( checker.isValidSyntax( "-" ) );
-    }
-
-
-    public void testWrongCase()
-    {
-        assertFalse( checker.isValidSyntax( "000" ) );
-        assertFalse( checker.isValidSyntax( "-0" ) );
-        assertFalse( checker.isValidSyntax( " 1" ) );
-        assertFalse( checker.isValidSyntax( "1 " ) );
-    }
-
-
-    public void testCorrectCase()
-    {
-        assertTrue( checker.isValidSyntax( "1" ) );
-        assertTrue( checker.isValidSyntax( "10" ) );
-        assertTrue( checker.isValidSyntax( "111" ) );
-        assertTrue( checker.isValidSyntax( "-1" ) );
-        assertTrue( checker.isValidSyntax( "-123" ) );
-        assertTrue( checker.isValidSyntax( "123" ) );
-    }
-
-
-    public void testMinValueBoundry()
-    {
-        int min = Byte.MIN_VALUE;
-        assertTrue( checker.isValidSyntax( Integer.toString( min ) ) );
-        min--;
-        assertFalse( checker.isValidSyntax( Integer.toString( min ) ) );
-        min--;
-        assertFalse( checker.isValidSyntax( Integer.toString( min ) ) );
-    }
-
-
-    public void testMaxValueBoundry()
-    {
-        int max = Byte.MAX_VALUE;
-        assertTrue( checker.isValidSyntax( Integer.toString( max ) ) );
-        max++;
-        assertFalse( checker.isValidSyntax( Integer.toString( max ) ) );
-        max++;
-        assertFalse( checker.isValidSyntax( Integer.toString( max ) ) );
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.schema.syntax;
+
+import junit.framework.TestCase;
+
+/**
+ * Test cases for JavaByteSyntaxChecker.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class JavaByteSyntaxCheckerTest extends TestCase
+{
+    JavaByteSyntaxChecker checker = new JavaByteSyntaxChecker();
+
+
+    public void testNullString()
+    {
+        assertFalse( checker.isValidSyntax( null ) );
+    }
+
+
+    public void testEmptyString()
+    {
+        assertFalse( checker.isValidSyntax( "" ) );
+    }
+
+
+    public void testOneCharString()
+    {
+        assertFalse( checker.isValidSyntax( "f" ) );
+        assertFalse( checker.isValidSyntax( "-" ) );
+    }
+
+
+    public void testWrongCase()
+    {
+        assertFalse( checker.isValidSyntax( "000" ) );
+        assertFalse( checker.isValidSyntax( "-0" ) );
+        assertFalse( checker.isValidSyntax( " 1" ) );
+        assertFalse( checker.isValidSyntax( "1 " ) );
+    }
+
+
+    public void testCorrectCase()
+    {
+        assertTrue( checker.isValidSyntax( "1" ) );
+        assertTrue( checker.isValidSyntax( "10" ) );
+        assertTrue( checker.isValidSyntax( "111" ) );
+        assertTrue( checker.isValidSyntax( "-1" ) );
+        assertTrue( checker.isValidSyntax( "-123" ) );
+        assertTrue( checker.isValidSyntax( "123" ) );
+    }
+
+
+    public void testMinValueBoundry()
+    {
+        int min = Byte.MIN_VALUE;
+        assertTrue( checker.isValidSyntax( Integer.toString( min ) ) );
+        min--;
+        assertFalse( checker.isValidSyntax( Integer.toString( min ) ) );
+        min--;
+        assertFalse( checker.isValidSyntax( Integer.toString( min ) ) );
+    }
+
+
+    public void testMaxValueBoundry()
+    {
+        int max = Byte.MAX_VALUE;
+        assertTrue( checker.isValidSyntax( Integer.toString( max ) ) );
+        max++;
+        assertFalse( checker.isValidSyntax( Integer.toString( max ) ) );
+        max++;
+        assertFalse( checker.isValidSyntax( Integer.toString( max ) ) );
+    }
+}

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaIntegerSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaIntegerSyntaxCheckerTest.java?rev=577361&r1=577360&r2=577361&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaIntegerSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaIntegerSyntaxCheckerTest.java
Wed Sep 19 09:48:46 2007
@@ -1,96 +1,96 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.shared.ldap.schema.syntax;
-
-import junit.framework.TestCase;
-
-import java.math.BigInteger;
-
-/**
- * Test cases for IntegerSyntaxChecker.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
- */
-public class JavaIntegerSyntaxCheckerTest extends TestCase
-{
-    JavaIntegerSyntaxChecker checker = new JavaIntegerSyntaxChecker();
-
-
-    public void testNullString()
-    {
-        assertFalse( checker.isValidSyntax( null ) );
-    }
-
-
-    public void testEmptyString()
-    {
-        assertFalse( checker.isValidSyntax( "" ) );
-    }
-
-
-    public void testOneCharString()
-    {
-        assertFalse( checker.isValidSyntax( "f" ) );
-        assertFalse( checker.isValidSyntax( "-" ) );
-    }
-
-
-    public void testWrongCase()
-    {
-        assertFalse( checker.isValidSyntax( "000" ) );
-        assertFalse( checker.isValidSyntax( "-0" ) );
-        assertFalse( checker.isValidSyntax( " 1" ) );
-        assertFalse( checker.isValidSyntax( "1 " ) );
-    }
-
-
-    public void testCorrectCase()
-    {
-        assertTrue( checker.isValidSyntax( "1" ) );
-        assertTrue( checker.isValidSyntax( "10" ) );
-        assertTrue( checker.isValidSyntax( "1111" ) );
-        assertTrue( checker.isValidSyntax( "-1" ) );
-        assertTrue( checker.isValidSyntax( "-1234567891" ) );
-        assertTrue( checker.isValidSyntax( "123456789" ) );
-    }
-
-
-    public void testMinValueBoundry()
-    {
-        BigInteger min = new BigInteger( Integer.toString( Integer.MIN_VALUE ) );
-        assertTrue( checker.isValidSyntax( min.toString() ) );
-        min = min.subtract( BigInteger.ONE );
-        assertFalse( checker.isValidSyntax( min.toString() ) );
-        min = min.subtract( BigInteger.ONE );
-        assertFalse( checker.isValidSyntax( min.toString() ) );
-    }
-
-
-    public void testMaxValueBoundry()
-    {
-        BigInteger max = new BigInteger( Integer.toString( Integer.MAX_VALUE ) );
-        assertTrue( checker.isValidSyntax( max.toString() ) );
-        max = max.add( BigInteger.ONE );
-        assertFalse( checker.isValidSyntax( max.toString() ) );
-        max = max.add( BigInteger.ONE );
-        assertFalse( checker.isValidSyntax( max.toString() ) );
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.schema.syntax;
+
+import junit.framework.TestCase;
+
+import java.math.BigInteger;
+
+/**
+ * Test cases for IntegerSyntaxChecker.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class JavaIntegerSyntaxCheckerTest extends TestCase
+{
+    JavaIntegerSyntaxChecker checker = new JavaIntegerSyntaxChecker();
+
+
+    public void testNullString()
+    {
+        assertFalse( checker.isValidSyntax( null ) );
+    }
+
+
+    public void testEmptyString()
+    {
+        assertFalse( checker.isValidSyntax( "" ) );
+    }
+
+
+    public void testOneCharString()
+    {
+        assertFalse( checker.isValidSyntax( "f" ) );
+        assertFalse( checker.isValidSyntax( "-" ) );
+    }
+
+
+    public void testWrongCase()
+    {
+        assertFalse( checker.isValidSyntax( "000" ) );
+        assertFalse( checker.isValidSyntax( "-0" ) );
+        assertFalse( checker.isValidSyntax( " 1" ) );
+        assertFalse( checker.isValidSyntax( "1 " ) );
+    }
+
+
+    public void testCorrectCase()
+    {
+        assertTrue( checker.isValidSyntax( "1" ) );
+        assertTrue( checker.isValidSyntax( "10" ) );
+        assertTrue( checker.isValidSyntax( "1111" ) );
+        assertTrue( checker.isValidSyntax( "-1" ) );
+        assertTrue( checker.isValidSyntax( "-1234567891" ) );
+        assertTrue( checker.isValidSyntax( "123456789" ) );
+    }
+
+
+    public void testMinValueBoundry()
+    {
+        BigInteger min = new BigInteger( Integer.toString( Integer.MIN_VALUE ) );
+        assertTrue( checker.isValidSyntax( min.toString() ) );
+        min = min.subtract( BigInteger.ONE );
+        assertFalse( checker.isValidSyntax( min.toString() ) );
+        min = min.subtract( BigInteger.ONE );
+        assertFalse( checker.isValidSyntax( min.toString() ) );
+    }
+
+
+    public void testMaxValueBoundry()
+    {
+        BigInteger max = new BigInteger( Integer.toString( Integer.MAX_VALUE ) );
+        assertTrue( checker.isValidSyntax( max.toString() ) );
+        max = max.add( BigInteger.ONE );
+        assertFalse( checker.isValidSyntax( max.toString() ) );
+        max = max.add( BigInteger.ONE );
+        assertFalse( checker.isValidSyntax( max.toString() ) );
+    }
+}

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaLongSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaLongSyntaxCheckerTest.java?rev=577361&r1=577360&r2=577361&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaLongSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaLongSyntaxCheckerTest.java
Wed Sep 19 09:48:46 2007
@@ -1,96 +1,96 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.shared.ldap.schema.syntax;
-
-import junit.framework.TestCase;
-
-import java.math.BigInteger;
-
-/**
- * Test cases for JavaLongSyntaxChecker.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
- */
-public class JavaLongSyntaxCheckerTest extends TestCase
-{
-    JavaLongSyntaxChecker checker = new JavaLongSyntaxChecker();
-
-
-    public void testNullString()
-    {
-        assertFalse( checker.isValidSyntax( null ) );
-    }
-
-
-    public void testEmptyString()
-    {
-        assertFalse( checker.isValidSyntax( "" ) );
-    }
-
-
-    public void testOneCharString()
-    {
-        assertFalse( checker.isValidSyntax( "f" ) );
-        assertFalse( checker.isValidSyntax( "-" ) );
-    }
-
-
-    public void testWrongCase()
-    {
-        assertFalse( checker.isValidSyntax( "000" ) );
-        assertFalse( checker.isValidSyntax( "-0" ) );
-        assertFalse( checker.isValidSyntax( " 1" ) );
-        assertFalse( checker.isValidSyntax( "1 " ) );
-    }
-
-
-    public void testCorrectCase()
-    {
-        assertTrue( checker.isValidSyntax( "1" ) );
-        assertTrue( checker.isValidSyntax( "10" ) );
-        assertTrue( checker.isValidSyntax( "111" ) );
-        assertTrue( checker.isValidSyntax( "-1" ) );
-        assertTrue( checker.isValidSyntax( "-123" ) );
-        assertTrue( checker.isValidSyntax( "123" ) );
-    }
-
-
-    public void testMinValueBoundry()
-    {
-        BigInteger min = new BigInteger( Long.toString( Long.MIN_VALUE ) );
-        assertTrue( checker.isValidSyntax( min.toString() ) );
-        min = min.subtract( BigInteger.ONE );
-        assertFalse( checker.isValidSyntax( min.toString() ) );
-        min = min.subtract( BigInteger.ONE );
-        assertFalse( checker.isValidSyntax( min.toString() ) );
-    }
-
-
-    public void testMaxValueBoundry()
-    {
-        BigInteger max = new BigInteger( Long.toString( Long.MAX_VALUE ) );
-        assertTrue( checker.isValidSyntax( max.toString() ) );
-        max = max.add( BigInteger.ONE );
-        assertFalse( checker.isValidSyntax( max.toString() ) );
-        max = max.add( BigInteger.ONE );
-        assertFalse( checker.isValidSyntax( max.toString() ) );
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.schema.syntax;
+
+import junit.framework.TestCase;
+
+import java.math.BigInteger;
+
+/**
+ * Test cases for JavaLongSyntaxChecker.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class JavaLongSyntaxCheckerTest extends TestCase
+{
+    JavaLongSyntaxChecker checker = new JavaLongSyntaxChecker();
+
+
+    public void testNullString()
+    {
+        assertFalse( checker.isValidSyntax( null ) );
+    }
+
+
+    public void testEmptyString()
+    {
+        assertFalse( checker.isValidSyntax( "" ) );
+    }
+
+
+    public void testOneCharString()
+    {
+        assertFalse( checker.isValidSyntax( "f" ) );
+        assertFalse( checker.isValidSyntax( "-" ) );
+    }
+
+
+    public void testWrongCase()
+    {
+        assertFalse( checker.isValidSyntax( "000" ) );
+        assertFalse( checker.isValidSyntax( "-0" ) );
+        assertFalse( checker.isValidSyntax( " 1" ) );
+        assertFalse( checker.isValidSyntax( "1 " ) );
+    }
+
+
+    public void testCorrectCase()
+    {
+        assertTrue( checker.isValidSyntax( "1" ) );
+        assertTrue( checker.isValidSyntax( "10" ) );
+        assertTrue( checker.isValidSyntax( "111" ) );
+        assertTrue( checker.isValidSyntax( "-1" ) );
+        assertTrue( checker.isValidSyntax( "-123" ) );
+        assertTrue( checker.isValidSyntax( "123" ) );
+    }
+
+
+    public void testMinValueBoundry()
+    {
+        BigInteger min = new BigInteger( Long.toString( Long.MIN_VALUE ) );
+        assertTrue( checker.isValidSyntax( min.toString() ) );
+        min = min.subtract( BigInteger.ONE );
+        assertFalse( checker.isValidSyntax( min.toString() ) );
+        min = min.subtract( BigInteger.ONE );
+        assertFalse( checker.isValidSyntax( min.toString() ) );
+    }
+
+
+    public void testMaxValueBoundry()
+    {
+        BigInteger max = new BigInteger( Long.toString( Long.MAX_VALUE ) );
+        assertTrue( checker.isValidSyntax( max.toString() ) );
+        max = max.add( BigInteger.ONE );
+        assertFalse( checker.isValidSyntax( max.toString() ) );
+        max = max.add( BigInteger.ONE );
+        assertFalse( checker.isValidSyntax( max.toString() ) );
+    }
+}

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaShortSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaShortSyntaxCheckerTest.java?rev=577361&r1=577360&r2=577361&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaShortSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/JavaShortSyntaxCheckerTest.java
Wed Sep 19 09:48:46 2007
@@ -1,94 +1,94 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.shared.ldap.schema.syntax;
-
-import junit.framework.TestCase;
-
-/**
- * Test cases for JavaShortSyntaxChecker.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$
- */
-public class JavaShortSyntaxCheckerTest extends TestCase
-{
-    JavaShortSyntaxChecker checker = new JavaShortSyntaxChecker();
-
-
-    public void testNullString()
-    {
-        assertFalse( checker.isValidSyntax( null ) );
-    }
-
-
-    public void testEmptyString()
-    {
-        assertFalse( checker.isValidSyntax( "" ) );
-    }
-
-
-    public void testOneCharString()
-    {
-        assertFalse( checker.isValidSyntax( "f" ) );
-        assertFalse( checker.isValidSyntax( "-" ) );
-    }
-
-
-    public void testWrongCase()
-    {
-        assertFalse( checker.isValidSyntax( "000" ) );
-        assertFalse( checker.isValidSyntax( "-0" ) );
-        assertFalse( checker.isValidSyntax( " 1" ) );
-        assertFalse( checker.isValidSyntax( "1 " ) );
-    }
-
-
-    public void testCorrectCase()
-    {
-        assertTrue( checker.isValidSyntax( "1" ) );
-        assertTrue( checker.isValidSyntax( "10" ) );
-        assertTrue( checker.isValidSyntax( "111" ) );
-        assertTrue( checker.isValidSyntax( "-1" ) );
-        assertTrue( checker.isValidSyntax( "-123" ) );
-        assertTrue( checker.isValidSyntax( "123" ) );
-    }
-
-
-    public void testMinValueBoundry()
-    {
-        int min = Short.MIN_VALUE;
-        assertTrue( checker.isValidSyntax( Integer.toString( min ) ) );
-        min--;
-        assertFalse( checker.isValidSyntax( Integer.toString( min ) ) );
-        min--;
-        assertFalse( checker.isValidSyntax( Integer.toString( min ) ) );
-    }
-
-
-    public void testMaxValueBoundry()
-    {
-        int max = Short.MAX_VALUE;
-        assertTrue( checker.isValidSyntax( Integer.toString( max ) ) );
-        max++;
-        assertFalse( checker.isValidSyntax( Integer.toString( max ) ) );
-        max++;
-        assertFalse( checker.isValidSyntax( Integer.toString( max ) ) );
-    }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.schema.syntax;
+
+import junit.framework.TestCase;
+
+/**
+ * Test cases for JavaShortSyntaxChecker.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class JavaShortSyntaxCheckerTest extends TestCase
+{
+    JavaShortSyntaxChecker checker = new JavaShortSyntaxChecker();
+
+
+    public void testNullString()
+    {
+        assertFalse( checker.isValidSyntax( null ) );
+    }
+
+
+    public void testEmptyString()
+    {
+        assertFalse( checker.isValidSyntax( "" ) );
+    }
+
+
+    public void testOneCharString()
+    {
+        assertFalse( checker.isValidSyntax( "f" ) );
+        assertFalse( checker.isValidSyntax( "-" ) );
+    }
+
+
+    public void testWrongCase()
+    {
+        assertFalse( checker.isValidSyntax( "000" ) );
+        assertFalse( checker.isValidSyntax( "-0" ) );
+        assertFalse( checker.isValidSyntax( " 1" ) );
+        assertFalse( checker.isValidSyntax( "1 " ) );
+    }
+
+
+    public void testCorrectCase()
+    {
+        assertTrue( checker.isValidSyntax( "1" ) );
+        assertTrue( checker.isValidSyntax( "10" ) );
+        assertTrue( checker.isValidSyntax( "111" ) );
+        assertTrue( checker.isValidSyntax( "-1" ) );
+        assertTrue( checker.isValidSyntax( "-123" ) );
+        assertTrue( checker.isValidSyntax( "123" ) );
+    }
+
+
+    public void testMinValueBoundry()
+    {
+        int min = Short.MIN_VALUE;
+        assertTrue( checker.isValidSyntax( Integer.toString( min ) ) );
+        min--;
+        assertFalse( checker.isValidSyntax( Integer.toString( min ) ) );
+        min--;
+        assertFalse( checker.isValidSyntax( Integer.toString( min ) ) );
+    }
+
+
+    public void testMaxValueBoundry()
+    {
+        int max = Short.MAX_VALUE;
+        assertTrue( checker.isValidSyntax( Integer.toString( max ) ) );
+        max++;
+        assertFalse( checker.isValidSyntax( Integer.toString( max ) ) );
+        max++;
+        assertFalse( checker.isValidSyntax( Integer.toString( max ) ) );
+    }
+}



Mime
View raw message