*/
@Test
public void testGetValues()
{
final FloatArray array = new FloatArray(4);
array.setValue(0, 1);
array.setValue(1, 2);
array.setValue(2, 3);
array.setValue(3, 4);
// Test getting copy of values
double[] values = array.getValues();
assertEquals(1, values[0], 0.001f);
assertEquals(2, values[1], 0.001f);
assertEquals(3, values[2], 0.001f);
assertEquals(4, values[3], 0.001f);
// Test filling array with values
values = new double[4];
array.getValues(values);
assertEquals(1, values[0], 0.001f);
assertEquals(2, values[1], 0.001f);
assertEquals(3, values[2], 0.001f);
assertEquals(4, values[3], 0.001f);
// Test getting subset of array
values = new double[4];
array.getValues(1, 2, values);
assertEquals(2, values[0], 0.001f);
assertEquals(3, values[1], 0.001f);
assertEquals(0, values[2], 0.001f);
assertEquals(0, values[3], 0.001f);
// Test getting subset of array and writing to specific offset
values = new double[4];
array.getValues(1, 2, values, 1);
assertEquals(0, values[0], 0.001f);
assertEquals(2, values[1], 0.001f);
assertEquals(3, values[2], 0.001f);
assertEquals(0, values[3], 0.001f);
}