hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r155630 - in jakarta/httpclient/trunk/http-common/src: java/org/apache/http/util/LangUtils.java test/org/apache/http/util/TestAllUtil.java test/org/apache/http/util/TestParameterParser.java
Date Sun, 27 Feb 2005 18:53:39 GMT
Author: olegk
Date: Sun Feb 27 10:53:37 2005
New Revision: 155630

URL: http://svn.apache.org/viewcvs?view=rev&rev=155630
Log:
LangUtil test cases

Modified:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/util/LangUtils.java
    jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestAllUtil.java
    jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestParameterParser.java

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/util/LangUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/util/LangUtils.java?view=diff&r1=155629&r2=155630
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/util/LangUtils.java (original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/util/LangUtils.java Sun
Feb 27 10:53:37 2005
@@ -70,6 +70,8 @@
                         return false;
                     }
                 }
+            } else {
+                return false;
             }
         }
         return true;

Modified: jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestAllUtil.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestAllUtil.java?view=diff&r1=155629&r2=155630
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestAllUtil.java (original)
+++ jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestAllUtil.java Sun
Feb 27 10:53:37 2005
@@ -39,6 +39,7 @@
     public static Test suite() {
         TestSuite suite = new TestSuite();
         suite.addTest(TestParameterParser.suite());
+        suite.addTest(TestLangUtils.suite());
         return suite;
     }
 

Modified: jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestParameterParser.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestParameterParser.java?view=diff&r1=155629&r2=155630
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestParameterParser.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/test/org/apache/http/util/TestParameterParser.java
Sun Feb 27 10:53:37 2005
@@ -95,4 +95,14 @@
         params = parser.parse(s, ';');
         assertEquals(0, params.size());
     }
+
+    public void testNullInput() {
+        ParameterParser  parser = new ParameterParser();
+        List params = parser.parse((String)null, ';');
+        assertEquals(0, params.size());        
+        params = parser.parse((char[])null, ';');
+        assertEquals(0, params.size());        
+        params = parser.parse((char[])null, 0, 0, ';');
+        assertEquals(0, params.size());        
+    }
 }



Mime
View raw message