j3d.org Code

org.j3d.util.interpolator
Class TestCoordinateInterpolator

java.lang.Object
  extended byTestCase
      extended byorg.j3d.util.interpolator.TestCoordinateInterpolator

public class TestCoordinateInterpolator
extends TestCase

A test case to check the functionality of the CoordinateInterpolator implementation.

The test aims to check insertion and key value generation of the interpolator.

Version:
$Revision: 1.2 $
Author:
Justin Couc
See Also:
Serialized Form

Constructor Summary
TestCoordinateInterpolator(java.lang.String s)
          Create an instance of the test case for this particular test name.
 
Method Summary
static void main(java.lang.String[] args)
           
 void setUp()
          Pre-test instance setup code.
static Test suite()
          Fetch the suite of tests for this test class to perform.
 void testClamping()
          Test that we can generate values that are clamped to the extent values of the interpolator for keys that are out of range to those inserted.
 void testCreateFloat()
          Test that we can create a basic array of values using float arrays inserted linearly without generating exceptions.
 void testInvalidInsert()
          Test the attempts to insert invalid lengths of data into the array
 void testKeyGenFloat()
          Test that we can generate simple values for keys that are in range easily.
 void testValueInsertFloat()
          Test that we can create an array of values with values being inserted between other values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCoordinateInterpolator

public TestCoordinateInterpolator(java.lang.String s)
Create an instance of the test case for this particular test name.

Method Detail

suite

public static Test suite()
Fetch the suite of tests for this test class to perform.

Returns:
A collection of all the tests to be run

setUp

public void setUp()
Pre-test instance setup code. We check here to make sure that the key and value arrays are the same length just in case someone has stuffed it up when playing with this code.


testInvalidInsert

public void testInvalidInsert()
Test the attempts to insert invalid lengths of data into the array


testCreateFloat

public void testCreateFloat()
Test that we can create a basic array of values using float arrays inserted linearly without generating exceptions.


testValueInsertFloat

public void testValueInsertFloat()
Test that we can create an array of values with values being inserted between other values.


testKeyGenFloat

public void testKeyGenFloat()
Test that we can generate simple values for keys that are in range easily. The earlier tests have made sure that we are returning the right values when the key is exactly equal to one of the end values. Now we are looking at a couple of coordinated points long each axis.


testClamping

public void testClamping()
Test that we can generate values that are clamped to the extent values of the interpolator for keys that are out of range to those inserted.


main

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

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org