Skip to content
Snippets Groups Projects
Commit e785cb42 authored by brinn's avatar brinn
Browse files

change: throw IndexOutOfBoundsException (rather than IllegalArgumentException)...

change: throw IndexOutOfBoundsException (rather than IllegalArgumentException) when an index is out-of-bounds (upgrade all native libs)
add: tests of new methods in NativeData

SVN: 19802
parent 94ea184e
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
#============================================================================
# Visual C++ directory, for example
VCPPDIR=C:\Program Files\Microsoft Visual Studio 8\VC
VCPPDIR=C:\Program Files\Microsoft Visual Studio 9.0\VC
# Directory where JDK is installed (We require JDK 1.5 or above), for example
JAVADIR=C:\Program Files\Java\jdk1.5.0_22
......
......@@ -6,7 +6,7 @@
#============================================================================
# Visual C++ directory, for example
VCPPDIR=C:\Program Files (x86)\Microsoft Visual Studio 8\VC
VCPPDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
# Directory where JDK is installed (We require JDK 1.5 or above), for example
JAVADIR=C:\Program Files\Java\jdk1.5.0_22
......
......@@ -324,12 +324,18 @@ public class NativeDataTests
NativeData.copyByteToLong(null, 0, null, 0, 0, ByteOrder.NATIVE);
}
@Test(expectedExceptions = {IllegalArgumentException.class, IndexOutOfBoundsException.class})
public void testIAE()
@Test(expectedExceptions = IndexOutOfBoundsException.class)
public void testIOOB()
{
NativeData.copyByteToLong(new byte[] {}, -1, new long[] {}, 0, 0, ByteOrder.NATIVE);
}
@Test(expectedExceptions = IndexOutOfBoundsException.class)
public void testIOOB2()
{
NativeData.copyByteToLong(new byte[] {}, 0, new long[] {}, 10, 0, ByteOrder.NATIVE);
}
@Test
public void testPlatformEndiness()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment