You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2012/10/18 05:08:19 UTC
svn commit: r1399506 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/spatial/ lucene/spatial/src/test-files/data/
lucene/spatial/src/test/org/apache/lucene/spatial/
lucene/spatial/src/test/org/apache/lucene/spatial/prefix/
Author: dsmiley
Date: Thu Oct 18 03:08:19 2012
New Revision: 1399506
URL: http://svn.apache.org/viewvc?rev=1399506&view=rev
Log:
LUCENE-4464 polygon almost touch test
Added:
lucene/dev/branches/branch_4x/lucene/spatial/src/test-files/data/LUCENE-4464.txt
- copied unchanged from r1399185, lucene/dev/trunk/lucene/spatial/src/test-files/data/LUCENE-4464.txt
lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java
- copied unchanged from r1399185, lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/spatial/ (props changed)
lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java
Modified: lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java?rev=1399506&r1=1399505&r2=1399506&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java (original)
+++ lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java Thu Oct 18 03:08:19 2012
@@ -34,6 +34,7 @@ import org.apache.lucene.search.TopDocs;
import org.apache.lucene.spatial.query.SpatialArgsParser;
import org.junit.Assert;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
@@ -107,8 +108,11 @@ public abstract class StrategyTestCase e
}
protected Iterator<SampleData> getSampleData(String testDataFile) throws IOException {
- return new SampleDataReader(
- getClass().getClassLoader().getResourceAsStream("data/"+testDataFile) );
+ String path = "data/" + testDataFile;
+ InputStream stream = getClass().getClassLoader().getResourceAsStream(path);
+ if (stream == null)
+ throw new FileNotFoundException("classpath resource not found: "+path);
+ return new SampleDataReader(stream);
}
protected Iterator<SpatialTestQuery> getTestQueries(String testQueryFile, SpatialContext ctx) throws IOException {