Java API: Removed meaningless tests
This commit is contained in:
parent
c0cd317284
commit
7c8a49b475
@ -6,14 +6,14 @@ import org.opencv.test.OpenCVTestCase;
|
||||
|
||||
public class KeyPointTest extends OpenCVTestCase {
|
||||
|
||||
private float angle;
|
||||
private int classId;
|
||||
private KeyPoint keyPoint;
|
||||
private int octave;
|
||||
private float response;
|
||||
private float size;
|
||||
private float x;
|
||||
private float y;
|
||||
private float angle;
|
||||
private float response;
|
||||
private int octave;
|
||||
private int classId;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
@ -29,89 +29,34 @@ public class KeyPointTest extends OpenCVTestCase {
|
||||
classId = 1;
|
||||
}
|
||||
|
||||
public void testGet_angle() {
|
||||
keyPoint = new KeyPoint(x, y, size, angle);
|
||||
assertEquals(30.0f, keyPoint.angle);
|
||||
}
|
||||
|
||||
public void testGet_class_id() {
|
||||
keyPoint = new KeyPoint(x, y, size, angle, response, octave, classId);
|
||||
assertEquals(1, keyPoint.class_id);
|
||||
}
|
||||
|
||||
public void testGet_octave() {
|
||||
keyPoint = new KeyPoint(x, y, size, angle, response, octave);
|
||||
assertEquals(1, keyPoint.octave);
|
||||
}
|
||||
|
||||
public void testGet_pt() {
|
||||
keyPoint = new KeyPoint(x, y, size);
|
||||
assertPointEquals(new Point(1, 2), keyPoint.pt, EPS);
|
||||
}
|
||||
|
||||
public void testGet_response() {
|
||||
keyPoint = new KeyPoint(x, y, size, angle, response);
|
||||
assertEquals(2.0f, keyPoint.response);
|
||||
}
|
||||
|
||||
public void testGet_size() {
|
||||
keyPoint = new KeyPoint(x, y, size);
|
||||
assertEquals(3.0f, keyPoint.size);
|
||||
}
|
||||
|
||||
public void testKeyPoint() {
|
||||
keyPoint = new KeyPoint();
|
||||
assertPointEquals(new Point(0, 0), keyPoint.pt, EPS);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size);
|
||||
assertPointEquals(new Point(1, 2), keyPoint.pt, EPS);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size, 10.0f);
|
||||
assertEquals(10.0f, keyPoint.angle);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloatFloatFloat() {
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f);
|
||||
assertEquals(1.0f, keyPoint.response);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloatFloatFloatInt() {
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f, 1);
|
||||
assertEquals(1, keyPoint.octave);
|
||||
}
|
||||
|
||||
public void testKeyPointFloatFloatFloatFloatFloatIntInt() {
|
||||
keyPoint = new KeyPoint(x, y, size, 1.0f, 1.0f, 1, 1);
|
||||
}
|
||||
|
||||
public void testSet_angle() {
|
||||
keyPoint = new KeyPoint(x, y, size, angle);
|
||||
keyPoint.angle = 10f;
|
||||
}
|
||||
|
||||
public void testSet_class_id() {
|
||||
keyPoint = new KeyPoint(x, y, size, angle, response, octave, classId);
|
||||
keyPoint.class_id = 2;
|
||||
}
|
||||
|
||||
public void testSet_octave() {
|
||||
keyPoint = new KeyPoint(x, y, size, angle, response, octave);
|
||||
keyPoint.octave = 0;
|
||||
}
|
||||
|
||||
public void testSet_pt() {
|
||||
keyPoint = new KeyPoint(x, y, size);
|
||||
keyPoint.pt = new Point(4, 3);
|
||||
assertPointEquals(new Point(4, 3), keyPoint.pt, EPS);
|
||||
}
|
||||
|
||||
public void testSet_response() {
|
||||
keyPoint = new KeyPoint(x, y, size, angle, response);
|
||||
keyPoint.response = 1.5f;
|
||||
}
|
||||
|
||||
public void testSet_size() {
|
||||
keyPoint = new KeyPoint(x, y, size);
|
||||
keyPoint.size = 5.0f;
|
||||
assertEquals(1, keyPoint.class_id);
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user