add clover hack

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1358377 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-07-06 19:48:28 +00:00
parent 05ef395e96
commit 007b8d6a82
1 changed files with 21 additions and 4 deletions

View File

@ -59,22 +59,39 @@ public class PortedSolr3Test extends StrategyTestCase {
grid = new GeohashPrefixTree(ctx,12);
strategy = new RecursivePrefixTreeStrategy(grid, "recursive_geohash");
ctorArgs.add(new Object[]{strategy});
ctorArgs.add(new Object[]{new Param(strategy, "recursive_geohash")});
grid = new QuadPrefixTree(ctx,25);
strategy = new RecursivePrefixTreeStrategy(grid, "recursive_quad");
ctorArgs.add(new Object[]{strategy});
ctorArgs.add(new Object[]{new Param(strategy, "recursive_quad")});
grid = new GeohashPrefixTree(ctx,12);
strategy = new TermQueryPrefixTreeStrategy(grid, "termquery_geohash");
ctorArgs.add(new Object[]{strategy});
ctorArgs.add(new Object[]{new Param(strategy, "termquery_geohash")});
return ctorArgs;
}
// this is a hack for clover!
static class Param {
SpatialStrategy strategy;
String description;
Param(SpatialStrategy strategy, String description) {
this.strategy = strategy;
this.description = description;
}
@Override
public String toString() {
return description;
}
}
// private String fieldName;
public PortedSolr3Test(SpatialStrategy strategy) {
public PortedSolr3Test(Param param) {
SpatialStrategy strategy = param.strategy;
this.ctx = strategy.getSpatialContext();
this.strategy = strategy;
}