org.apache.commons.lang
Class ArrayUtilsTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.lang.ArrayUtilsTest
All Implemented Interfaces:
junit.framework.Test

public class ArrayUtilsTest
extends junit.framework.TestCase

Unit tests ArrayUtils.

Version:
$Id: ArrayUtilsTest.java 594551 2007-11-13 14:35:33Z bayard $
Author:
Stephen Colebourne, Moritz Petersen, Nikolay Metchev, Matthew Hawthorne, Tim O'Brien, Ashwin S, Fredrik Westermarck, Gary Gregory, Maarten Coene

Constructor Summary
ArrayUtilsTest(java.lang.String name)
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void setUp()
           
static junit.framework.Test suite()
           
protected  void tearDown()
           
 void testClone()
           
 void testCloneBoolean()
           
 void testCloneByte()
           
 void testCloneChar()
           
 void testCloneDouble()
           
 void testCloneFloat()
           
 void testCloneInt()
           
 void testCloneLong()
           
 void testCloneShort()
           
 void testConstructor()
           
 void testContains()
           
 void testContainsBoolean()
           
 void testContainsByte()
           
 void testContainsChar()
           
 void testContainsDouble()
           
 void testContainsDoubleTolerance()
           
 void testContainsFloat()
           
 void testContainsInt()
           
 void testContainsLong()
           
 void testContainsShort()
           
 void testGetLength()
           
 void testHashCode()
           
 void testIndexOf()
           
 void testIndexOfBoolean()
           
 void testIndexOfBooleanWithStartIndex()
           
 void testIndexOfByte()
           
 void testIndexOfByteWithStartIndex()
           
 void testIndexOfChar()
           
 void testIndexOfCharWithStartIndex()
           
 void testIndexOfDouble()
           
 void testIndexOfDoubleTolerance()
           
 void testIndexOfDoubleWithStartIndex()
           
 void testIndexOfDoubleWithStartIndexTolerance()
           
 void testIndexOfFloat()
           
 void testIndexOfFloatWithStartIndex()
           
 void testIndexOfInt()
           
 void testIndexOfIntWithStartIndex()
           
 void testIndexOfLong()
           
 void testIndexOfLongWithStartIndex()
           
 void testIndexOfShort()
           
 void testIndexOfShortWithStartIndex()
           
 void testIndexOfWithStartIndex()
           
 void testIsEmptyObject()
          Test for ArrayUtils#isEmpty(java.lang.Object[]).
 void testIsEmptyPrimitives()
          Tests for ArrayUtils#isEmpty(long[]), ArrayUtils#isEmpty(int[]), ArrayUtils#isEmpty(short[]), ArrayUtils#isEmpty(char[]), ArrayUtils#isEmpty(byte[]), ArrayUtils#isEmpty(double[]), ArrayUtils#isEmpty(float[]) and ArrayUtils#isEmpty(boolean[]).
 void testIsEquals()
           
 void testLastIndexOf()
           
 void testLastIndexOfBoolean()
           
 void testLastIndexOfBooleanWithStartIndex()
           
 void testLastIndexOfByte()
           
 void testLastIndexOfByteWithStartIndex()
           
 void testLastIndexOfChar()
           
 void testLastIndexOfCharWithStartIndex()
           
 void testLastIndexOfDouble()
           
 void testLastIndexOfDoubleTolerance()
           
 void testLastIndexOfDoubleWithStartIndex()
           
 void testLastIndexOfDoubleWithStartIndexTolerance()
           
 void testLastIndexOfFloat()
           
 void testLastIndexOfFloatWithStartIndex()
           
 void testLastIndexOfInt()
           
 void testLastIndexOfIntWithStartIndex()
           
 void testLastIndexOfLong()
           
 void testLastIndexOfLongWithStartIndex()
           
 void testLastIndexOfShort()
           
 void testLastIndexOfShortWithStartIndex()
           
 void testLastIndexOfWithStartIndex()
           
 void testReverse()
           
 void testReverseBoolean()
           
 void testReverseByte()
           
 void testReverseChar()
           
 void testReverseDouble()
           
 void testReverseFloat()
           
 void testReverseInt()
           
 void testReverseLong()
           
 void testReverseShort()
           
 void testSameLength()
           
 void testSameLengthBoolean()
           
 void testSameLengthByte()
           
 void testSameLengthChar()
           
 void testSameLengthDouble()
           
 void testSameLengthFloat()
           
 void testSameLengthInt()
           
 void testSameLengthLong()
           
 void testSameLengthShort()
           
 void testSameType()
           
 void testSubarrayBoolean()
           
 void testSubarrayByte()
           
 void testSubarrayDouble()
           
 void testSubarrayFloat()
           
 void testSubarrayInt()
           
 void testSubarrayLong()
           
 void testSubarrayObject()
           
 void testSubarrayShort()
           
 void testSubarrChar()
           
 void testToMap()
           
 void testToObject_boolean()
           
 void testToObject_byte()
           
 void testToObject_char()
           
 void testToObject_double()
           
 void testToObject_float()
           
 void testToObject_int()
           
 void testToObject_long()
           
 void testToObject_short()
           
 void testToPrimitive_boolean_boolean()
           
 void testToPrimitive_boolean()
           
 void testToPrimitive_byte_byte()
           
 void testToPrimitive_byte()
           
 void testToPrimitive_char_char()
           
 void testToPrimitive_char()
           
 void testToPrimitive_double_double()
           
 void testToPrimitive_double()
           
 void testToPrimitive_float_float()
           
 void testToPrimitive_float()
           
 void testToPrimitive_int_int()
           
 void testToPrimitive_int()
           
 void testToPrimitive_intNull()
           
 void testToPrimitive_long_long()
           
 void testToPrimitive_long()
           
 void testToPrimitive_short_short()
           
 void testToPrimitive_short()
           
 void testToString()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayUtilsTest

public ArrayUtilsTest(java.lang.String name)
Method Detail

main

public static void main(java.lang.String[] args)

suite

public static junit.framework.Test suite()

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testConstructor

public void testConstructor()

testToString

public void testToString()

testHashCode

public void testHashCode()

testIsEquals

public void testIsEquals()

testToMap

public void testToMap()

testClone

public void testClone()

testCloneBoolean

public void testCloneBoolean()

testCloneLong

public void testCloneLong()

testCloneInt

public void testCloneInt()

testCloneShort

public void testCloneShort()

testCloneChar

public void testCloneChar()

testCloneByte

public void testCloneByte()

testCloneDouble

public void testCloneDouble()

testCloneFloat

public void testCloneFloat()

testSubarrayObject

public void testSubarrayObject()

testSubarrayLong

public void testSubarrayLong()

testSubarrayInt

public void testSubarrayInt()

testSubarrayShort

public void testSubarrayShort()

testSubarrChar

public void testSubarrChar()

testSubarrayByte

public void testSubarrayByte()

testSubarrayDouble

public void testSubarrayDouble()

testSubarrayFloat

public void testSubarrayFloat()

testSubarrayBoolean

public void testSubarrayBoolean()

testSameLength

public void testSameLength()

testSameLengthBoolean

public void testSameLengthBoolean()

testSameLengthLong

public void testSameLengthLong()

testSameLengthInt

public void testSameLengthInt()

testSameLengthShort

public void testSameLengthShort()

testSameLengthChar

public void testSameLengthChar()

testSameLengthByte

public void testSameLengthByte()

testSameLengthDouble

public void testSameLengthDouble()

testSameLengthFloat

public void testSameLengthFloat()

testSameType

public void testSameType()

testReverse

public void testReverse()

testReverseLong

public void testReverseLong()

testReverseInt

public void testReverseInt()

testReverseShort

public void testReverseShort()

testReverseChar

public void testReverseChar()

testReverseByte

public void testReverseByte()

testReverseDouble

public void testReverseDouble()

testReverseFloat

public void testReverseFloat()

testReverseBoolean

public void testReverseBoolean()

testIndexOf

public void testIndexOf()

testIndexOfWithStartIndex

public void testIndexOfWithStartIndex()

testLastIndexOf

public void testLastIndexOf()

testLastIndexOfWithStartIndex

public void testLastIndexOfWithStartIndex()

testContains

public void testContains()

testIndexOfLong

public void testIndexOfLong()

testIndexOfLongWithStartIndex

public void testIndexOfLongWithStartIndex()

testLastIndexOfLong

public void testLastIndexOfLong()

testLastIndexOfLongWithStartIndex

public void testLastIndexOfLongWithStartIndex()

testContainsLong

public void testContainsLong()

testIndexOfInt

public void testIndexOfInt()

testIndexOfIntWithStartIndex

public void testIndexOfIntWithStartIndex()

testLastIndexOfInt

public void testLastIndexOfInt()

testLastIndexOfIntWithStartIndex

public void testLastIndexOfIntWithStartIndex()

testContainsInt

public void testContainsInt()

testIndexOfShort

public void testIndexOfShort()

testIndexOfShortWithStartIndex

public void testIndexOfShortWithStartIndex()

testLastIndexOfShort

public void testLastIndexOfShort()

testLastIndexOfShortWithStartIndex

public void testLastIndexOfShortWithStartIndex()

testContainsShort

public void testContainsShort()

testIndexOfChar

public void testIndexOfChar()

testIndexOfCharWithStartIndex

public void testIndexOfCharWithStartIndex()

testLastIndexOfChar

public void testLastIndexOfChar()

testLastIndexOfCharWithStartIndex

public void testLastIndexOfCharWithStartIndex()

testContainsChar

public void testContainsChar()

testIndexOfByte

public void testIndexOfByte()

testIndexOfByteWithStartIndex

public void testIndexOfByteWithStartIndex()

testLastIndexOfByte

public void testLastIndexOfByte()

testLastIndexOfByteWithStartIndex

public void testLastIndexOfByteWithStartIndex()

testContainsByte

public void testContainsByte()

testIndexOfDouble

public void testIndexOfDouble()

testIndexOfDoubleTolerance

public void testIndexOfDoubleTolerance()

testIndexOfDoubleWithStartIndex

public void testIndexOfDoubleWithStartIndex()

testIndexOfDoubleWithStartIndexTolerance

public void testIndexOfDoubleWithStartIndexTolerance()

testLastIndexOfDouble

public void testLastIndexOfDouble()

testLastIndexOfDoubleTolerance

public void testLastIndexOfDoubleTolerance()

testLastIndexOfDoubleWithStartIndex

public void testLastIndexOfDoubleWithStartIndex()

testLastIndexOfDoubleWithStartIndexTolerance

public void testLastIndexOfDoubleWithStartIndexTolerance()

testContainsDouble

public void testContainsDouble()

testContainsDoubleTolerance

public void testContainsDoubleTolerance()

testIndexOfFloat

public void testIndexOfFloat()

testIndexOfFloatWithStartIndex

public void testIndexOfFloatWithStartIndex()

testLastIndexOfFloat

public void testLastIndexOfFloat()

testLastIndexOfFloatWithStartIndex

public void testLastIndexOfFloatWithStartIndex()

testContainsFloat

public void testContainsFloat()

testIndexOfBoolean

public void testIndexOfBoolean()

testIndexOfBooleanWithStartIndex

public void testIndexOfBooleanWithStartIndex()

testLastIndexOfBoolean

public void testLastIndexOfBoolean()

testLastIndexOfBooleanWithStartIndex

public void testLastIndexOfBooleanWithStartIndex()

testContainsBoolean

public void testContainsBoolean()

testToPrimitive_boolean

public void testToPrimitive_boolean()

testToPrimitive_boolean_boolean

public void testToPrimitive_boolean_boolean()

testToObject_boolean

public void testToObject_boolean()

testToPrimitive_char

public void testToPrimitive_char()

testToPrimitive_char_char

public void testToPrimitive_char_char()

testToObject_char

public void testToObject_char()

testToPrimitive_byte

public void testToPrimitive_byte()

testToPrimitive_byte_byte

public void testToPrimitive_byte_byte()

testToObject_byte

public void testToObject_byte()

testToPrimitive_short

public void testToPrimitive_short()

testToPrimitive_short_short

public void testToPrimitive_short_short()

testToObject_short

public void testToObject_short()

testToPrimitive_int

public void testToPrimitive_int()

testToPrimitive_int_int

public void testToPrimitive_int_int()

testToPrimitive_intNull

public void testToPrimitive_intNull()

testToObject_int

public void testToObject_int()

testToPrimitive_long

public void testToPrimitive_long()

testToPrimitive_long_long

public void testToPrimitive_long_long()

testToObject_long

public void testToObject_long()

testToPrimitive_float

public void testToPrimitive_float()

testToPrimitive_float_float

public void testToPrimitive_float_float()

testToObject_float

public void testToObject_float()

testToPrimitive_double

public void testToPrimitive_double()

testToPrimitive_double_double

public void testToPrimitive_double_double()

testToObject_double

public void testToObject_double()

testIsEmptyObject

public void testIsEmptyObject()
Test for ArrayUtils#isEmpty(java.lang.Object[]).


testIsEmptyPrimitives

public void testIsEmptyPrimitives()
Tests for ArrayUtils#isEmpty(long[]), ArrayUtils#isEmpty(int[]), ArrayUtils#isEmpty(short[]), ArrayUtils#isEmpty(char[]), ArrayUtils#isEmpty(byte[]), ArrayUtils#isEmpty(double[]), ArrayUtils#isEmpty(float[]) and ArrayUtils#isEmpty(boolean[]).


testGetLength

public void testGetLength()


Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.