Extra tests suggested by Clover
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137540 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ed86f124d6
commit
c6bfb25997
|
@ -70,7 +70,7 @@
|
|||
* @author Moritz Petersen
|
||||
* @author Nikolay Metchev
|
||||
* @author Matthew Hawthorne
|
||||
* @version $Id: ArrayUtilsTest.java,v 1.10 2003/07/30 22:21:39 scolebourne Exp $
|
||||
* @version $Id: ArrayUtilsTest.java,v 1.11 2003/07/31 22:31:12 scolebourne Exp $
|
||||
*/
|
||||
public class ArrayUtilsTest extends TestCase {
|
||||
|
||||
|
@ -684,7 +684,8 @@ public void testIndexOfWithStartIndex() {
|
|||
assertEquals(-1, ArrayUtils.indexOf(array, "notInArray", 2));
|
||||
|
||||
assertEquals(4, ArrayUtils.indexOf(array, null, -1));
|
||||
assertEquals(-1, ArrayUtils.indexOf(array, "0", 6));
|
||||
assertEquals(-1, ArrayUtils.indexOf(array, null, 8));
|
||||
assertEquals(-1, ArrayUtils.indexOf(array, "0", 8));
|
||||
}
|
||||
|
||||
public void testLastIndexOf() {
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
* @author <a href="mailto:bayard@generationjava.com">Henri Yandell</a>
|
||||
* @author <a href="mailto:ridesmet@users.sourceforge.net">Ringo De Smet</a>
|
||||
* @author Stephen Colebourne
|
||||
* @version $Id: CharSetUtilsTest.java,v 1.11 2003/07/31 21:32:47 scolebourne Exp $
|
||||
* @version $Id: CharSetUtilsTest.java,v 1.12 2003/07/31 22:31:12 scolebourne Exp $
|
||||
*/
|
||||
public class CharSetUtilsTest extends TestCase {
|
||||
|
||||
|
@ -130,6 +130,8 @@ public void testSqueeze_StringString() {
|
|||
assertEquals("hello", CharSetUtils.squeeze("hello", ""));
|
||||
assertEquals("hello", CharSetUtils.squeeze("hello", "a-e"));
|
||||
assertEquals("helo", CharSetUtils.squeeze("hello", "l-p"));
|
||||
assertEquals("heloo", CharSetUtils.squeeze("helloo", "l"));
|
||||
assertEquals("hello", CharSetUtils.squeeze("helloo", "^l"));
|
||||
}
|
||||
|
||||
public void testSqueeze_StringStringarray() {
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
*
|
||||
* @author Stephen Colebourne
|
||||
* @author Tetsuya Kaneuchi
|
||||
* @version $Id: SystemUtilsTest.java,v 1.4 2003/07/30 22:21:39 scolebourne Exp $
|
||||
* @version $Id: SystemUtilsTest.java,v 1.5 2003/07/31 22:31:12 scolebourne Exp $
|
||||
*/
|
||||
public class SystemUtilsTest extends TestCase {
|
||||
|
||||
|
@ -204,6 +204,11 @@ private boolean getOSMatches(String osNamePrefix, String osVersionPrefix) {
|
|||
return OS_NAME.startsWith(osNamePrefix) && OS_VERSION.startsWith(osVersionPrefix);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
public void testJavaVersion() {
|
||||
assertEquals(SystemUtils.JAVA_VERSION_FLOAT, SystemUtils.getJavaVersion(), 0f);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
public void testJavaVersionMatches() {
|
||||
JAVA_VERSION = null;
|
||||
|
|
Loading…
Reference in New Issue