|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
rangesearch.test.RangeSearch2DUtil
rangesearch.test.BruteForceTest
A class for testing BruteForceRangeSearchImpl with several hand built examples.
Constructor Summary | |
BruteForceTest(java.lang.String name)
|
Method Summary | |
protected Point2DIterator |
buildPointSequence(int[] coords)
Converts a sequence of points and returns them in the iterator used within the Range* classes |
protected jdsl.geomobj.api.Rectangle2D |
buildRect(int x1,
int y1,
int x2,
int y2)
A method to create a rectangle (for a query, ie.) |
protected void |
checkQuery(RangeSearch2D rs,
jdsl.geomobj.api.Rectangle2D r,
java.lang.String s)
A method to compare the output of a range search with the expected. |
void |
testSquare()
Initializes an instance of BruteForceRangeSearch2D with some hand picked points and tests these over several hand built query rectangles. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BruteForceTest(java.lang.String name)
Method Detail |
public void testSquare()
protected void checkQuery(RangeSearch2D rs, jdsl.geomobj.api.Rectangle2D r, java.lang.String s)
rs
- an instance of the rangesearchr
- a query rectangles
- a string containing the properly formatted result that is
expeceted.protected Point2DIterator buildPointSequence(int[] coords)
coords
- an array with twice the entries
as the number of points of the form [x1,y1,x2,y2,...]protected jdsl.geomobj.api.Rectangle2D buildRect(int x1, int y1, int x2, int y2)
x1
- the x coordinate of the lower lefthand corner of the
query rectangley1
- the y coordinate of the lower lefthand corner of the
query rectanglex2
- the x coordinate of the upper righthand corner of the
query rectangley2
- the y coordinate of the upper righthand corner of the
query rectangle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |