Restored test code inadvertently deleted with last commit.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@141098 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2004-02-17 04:33:16 +00:00
parent 9267ae3bb2
commit 31a89ac8db
1 changed files with 26 additions and 1 deletions

View File

@ -26,7 +26,7 @@ import junit.framework.TestSuite;
/**
* Test the interpolation framework.
*
* @version $Revision: 1.11 $ $Date: 2004/02/16 06:30:21 $
* @version $Revision: 1.12 $ $Date: 2004/02/17 04:33:16 $
*/
public class InterpolatorTest extends TestCase {
@ -47,7 +47,9 @@ public class InterpolatorTest extends TestCase {
double yval[] = { 0.0, 0.5, 1.0 };
UnivariateRealInterpolator i = new SplineInterpolator();
UnivariateRealFunction f = i.interpolate(xval, yval);
/* todo: rewrite using assertions
double x;
x = 0.0;
System.out.println(
@ -79,6 +81,29 @@ public class InterpolatorTest extends TestCase {
double yval[] = { 0.0, 0.5, 1.0, 1.5 };
UnivariateRealInterpolator i = new SplineInterpolator();
UnivariateRealFunction f = i.interpolate(xval, yval);
/* todo: rewrite with assertions
double x;
x = 0.0;
System.out.println(
"x="
+ x
+ " y="
+ f.value(x));
x = 0.5;
System.out.println(
"x="
+ x
+ " y="
+ f.value(x));
x = 1 - 1E-6;
System.out.println(
"x="
+ x
+ " y="
+ f.value(x));
*/
}