Package plotter

Examples of plotter.LineChecker.check()


    add(.9, .9);
    CountingGraphics g = paint();

    LineChecker c = new LineChecker();
    c.require(19, 180, 179, 20);
    c.check(g.getLines());
    assertEquals(2, g.getPointCount());
  }


  public void testPaintInverted() throws InterruptedException, InvocationTargetException {
View Full Code Here


    add(.9, .9);
    CountingGraphics g = paint();

    LineChecker c = new LineChecker();
    c.require(179, 180, 19, 20);
    c.check(g.getLines());
    assertEquals(2, g.getPointCount());
  }


  public void testPaintLeadingNaN() throws InterruptedException, InvocationTargetException {
View Full Code Here

    add(.9, .9);
    CountingGraphics g = paint();

    LineChecker c = new LineChecker();
    c.require(19, 180, 179, 20);
    c.check(g.getLines());
    assertEquals(2, g.getPointCount());
  }


  public void testPaintTrailingNaN() throws InterruptedException, InvocationTargetException {
View Full Code Here

    add(.95, Double.NaN);
    CountingGraphics g = paint();

    LineChecker c = new LineChecker();
    c.require(19, 180, 179, 20);
    c.check(g.getLines());
    assertEquals(2, g.getPointCount());
  }


  public void testPaintMiddleNaN() throws InterruptedException, InvocationTargetException {
View Full Code Here

    CountingGraphics g = paint();

    LineChecker c = new LineChecker();
    c.require(19, 180, 39, 160);
    c.require(159, 40, 179, 20);
    c.check(g.getLines());
    assertEquals(4, g.getPointCount());
  }


  public void testPaintTrailingTripleNaN() throws InterruptedException, InvocationTargetException {
View Full Code Here

    add(.97, Double.NaN);
    CountingGraphics g = paint();

    LineChecker c = new LineChecker();
    c.require(19, 180, 179, 20);
    c.check(g.getLines());
    assertEquals(2, g.getPointCount());
  }


  public void testAddToEmptyBox() throws InterruptedException, InvocationTargetException {
View Full Code Here

    LineChecker c = new LineChecker();
    c.allow(39, 160, 59, 140);
    c.allow(59, 140, 79, 120);
    c.require(79, 120, 99, 100);
    c.check(g.getLines());
    assertEquals(g.getLines().size() + 1, g.getPointCount());
  }


  public void testPrependToEmptyBox() throws InterruptedException, InvocationTargetException {
View Full Code Here

    CountingGraphics g = paint(new Rectangle(24, 176, 10, 10));

    LineChecker c = new LineChecker();
    c.require(19, 180, 39, 160);
    c.allow(39, 160, 59, 140);
    c.check(g.getLines());
    assertEquals(g.getLines().size() + 1, g.getPointCount());
  }


  public void testPrependDDToEmptyBox() throws InterruptedException, InvocationTargetException {
View Full Code Here

    CountingGraphics g = paint(new Rectangle(24, 176, 10, 10));

    LineChecker c = new LineChecker();
    c.require(19, 180, 39, 160);
    c.allow(39, 160, 59, 140);
    c.check(g.getLines());
    assertEquals(g.getLines().size() + 1, g.getPointCount());
  }


  public void testRemoveAllPoints() throws InterruptedException, InvocationTargetException {
View Full Code Here

    LineChecker c = new LineChecker();
    c.require(19, 180, 39, 160);
    c.allow(39, 160, 59, 140);
    c.allow(59, 140, 79, 120);
    c.check(g2.getLines());
    assertEquals(g2.getLines().size() + 1, g2.getPointCount());
  }


  public void testPaintClip() throws InterruptedException, InvocationTargetException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.