From 007b8d6a82a74c621645cfe6180c590d9418095d Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 6 Jul 2012 19:48:28 +0000 Subject: [PATCH] add clover hack git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1358377 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/spatial/PortedSolr3Test.java | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java b/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java index 92b97411534..b30026c0ce5 100644 --- a/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java +++ b/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java @@ -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; }