public class clone
implements Testlet
{
public void test(TestHarness harness)
{
QuadCurve2D curve;
// Checks 1 to 7: Clone a QuadCurve2D.Double
curve = (QuadCurve2D) (new QuadCurve2D.Double(4,3,9,1,7,8)).clone();
harness.check(curve instanceof QuadCurve2D.Double); // 1
harness.check(curve.getX1(), 4.0); // 2
harness.check(curve.getY1(), 3.0); // 3
harness.check(curve.getCtrlX(), 9.0); // 4
harness.check(curve.getCtrlY(), 1.0); // 5
harness.check(curve.getX2(), 7.0); // 6
harness.check(curve.getY2(), 8.0); // 7
// Checks 8 to 14: Clone a QuadCurve2D.Float
curve = (QuadCurve2D) (new QuadCurve2D.Float(-4,3,-9,1,7,-8)).clone();
harness.check(curve instanceof QuadCurve2D.Float); // 1
harness.check(curve.getX1(), -4.0); // 2
harness.check(curve.getY1(), 3.0); // 3
harness.check(curve.getCtrlX(), -9.0); // 4
harness.check(curve.getCtrlY(), 1.0); // 5
harness.check(curve.getX2(), 7.0); // 6
harness.check(curve.getY2(), -8.0); // 7
}