Package classes

Examples of classes.PointR


public class GestureTest {
  @Test
  public void testRawPoints() {
    Gesture g = new Gesture();
    ArrayList<PointR> a = new ArrayList<PointR>();
    a.add(new PointR(1, 1, 0));

    g.setRawPoints(a);

    assertEquals(a, g.getRawPoints());
View Full Code Here


  @Test
  public void testSaveGesture() {
    GeometricRecognizer geo = new GeometricRecognizer();

    List<PointR> points = new ArrayList<PointR>();
    PointR p1 = new PointR(355, 236, 329031);
    PointR p2 = new PointR(354, 236, 329062);
    PointR p3 = new PointR(353, 236, 329062);
    points.add(p1);
    points.add(p2);
    points.add(p3);

    assertFalse(geo.saveGesture(null, points));
View Full Code Here

    assertEquals(0, geo.getNumGestures());
    // Load xmltest.xml
    String filename = "/resources/tests/xmltest.xml";

    List<PointR> points = new ArrayList<PointR>();
    PointR p1 = new PointR(355, 236, 329031);
    PointR p2 = new PointR(354, 236, 329062);
    PointR p3 = new PointR(353, 236, 329062);
    points.add(p1);
    points.add(p2);
    points.add(p3);
    Gesture p = new Gesture("xmltest", points);
    if (geo.loadGesture(filename)) {
View Full Code Here

import classes.PointR;

public class PointRTest {
  @Test
  public void test() {
    PointR pr = new PointR(1, 6, 9);
    if (!(pr.getX() == 1 && pr.getY() == 6 && pr.getT() == 9)) {
      fail("PointR value constructor incorrect");
    }
  }
View Full Code Here

    }
  }

  @Test
  public void testCopyConstructor() {
    PointR pr = new PointR(1, 6, 9);
    PointR pp = new PointR(pr);
    if (!(pr.getX() == pp.getX() && pr.getY() == pp.getY() && pr.getT() == pp
        .getT())) {
      fail("PointR copy constructor incorrect");
    }
  }
View Full Code Here

    }
  }

  @Test
  public void testZeroTConstructor() {
    PointR pr = new PointR(1, 1);
    PointR pr2 = new PointR(1, 1, 0);

    assertEquals(pr, pr2);
  }
View Full Code Here

  }

  @Test
  public void testEqualsGenericObject() {
    Object o = new Object();
    PointR pr = new PointR(1, 6, 9);
    assertFalse(pr.equals(o));
  }
View Full Code Here

    assertFalse(pr.equals(o));
  }

  @Test
  public void testEqualsWrongPoint() {
    PointR o = new PointR(2, 4, 8);
    PointR pr = new PointR(1, 6, 9);
    assertFalse(pr.equals(o));
  }
View Full Code Here

    assertFalse(pr.equals(o));
  }

  @Test
  public void testEqualsRightPoint() {
    PointR o = new PointR(1, 6, 9);
    PointR pr = new PointR(1, 6, 9);
    assertTrue(pr.equals(o));
    assertTrue(o.equals(pr));
  }
View Full Code Here

    assertTrue(o.equals(pr));
  }

  @Test
  public void testEqualsSameObject() {
    PointR o = new PointR(1, 6, 9);
    assertTrue(o.equals(o));
  }
View Full Code Here

TOP

Related Classes of classes.PointR

Copyright © 2018 www.massapicom. 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.