You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2010/08/27 18:15:00 UTC
svn commit: r990189 - in
/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util:
LuceneTestCase.java LuceneTestCaseJ4.java
Author: rmuir
Date: Fri Aug 27 16:15:00 2010
New Revision: 990189
URL: http://svn.apache.org/viewvc?rev=990189&view=rev
Log:
add missing javadoc to base test classes
Modified:
lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java
lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCaseJ4.java
Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java?rev=990189&r1=990188&r2=990189&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCase.java Fri Aug 27 16:15:00 2010
@@ -333,6 +333,16 @@ public abstract class LuceneTestCase ext
return LuceneTestCaseJ4.newIndexWriterConfig(r, v, a);
}
+ /**
+ * Returns a new Dictionary instance. Use this when the test does not
+ * care about the specific Directory implementation (most tests).
+ * <p>
+ * The Directory is wrapped with {@link MockDirectoryWrapper}.
+ * By default this means it will be picky, such as ensuring that you
+ * properly close it and all open files in your test. It will emulate
+ * some features of Windows, such as not allowing open files to be
+ * overwritten.
+ */
public MockDirectoryWrapper newDirectory(Random r) throws IOException {
StackTraceElement[] stack = new Exception().getStackTrace();
Directory impl = LuceneTestCaseJ4.newDirectoryImpl(r, TEST_DIRECTORY);
@@ -341,6 +351,11 @@ public abstract class LuceneTestCase ext
return dir;
}
+ /**
+ * Returns a new Dictionary instance, with contents copied from the
+ * provided directory. See {@link #newDirectory(Random)} for more
+ * information.
+ */
public MockDirectoryWrapper newDirectory(Random r, Directory d) throws IOException {
StackTraceElement[] stack = new Exception().getStackTrace();
Directory impl = LuceneTestCaseJ4.newDirectoryImpl(r, TEST_DIRECTORY);
Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCaseJ4.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCaseJ4.java?rev=990189&r1=990188&r2=990189&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCaseJ4.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/LuceneTestCaseJ4.java Fri Aug 27 16:15:00 2010
@@ -591,6 +591,16 @@ public class LuceneTestCaseJ4 {
return c;
}
+ /**
+ * Returns a new Dictionary instance. Use this when the test does not
+ * care about the specific Directory implementation (most tests).
+ * <p>
+ * The Directory is wrapped with {@link MockDirectoryWrapper}.
+ * By default this means it will be picky, such as ensuring that you
+ * properly close it and all open files in your test. It will emulate
+ * some features of Windows, such as not allowing open files to be
+ * overwritten.
+ */
public static MockDirectoryWrapper newDirectory(Random r) throws IOException {
StackTraceElement[] stack = new Exception().getStackTrace();
Directory impl = newDirectoryImpl(r, TEST_DIRECTORY);
@@ -599,6 +609,11 @@ public class LuceneTestCaseJ4 {
return dir;
}
+ /**
+ * Returns a new Dictionary instance, with contents copied from the
+ * provided directory. See {@link #newDirectory(Random)} for more
+ * information.
+ */
public static MockDirectoryWrapper newDirectory(Random r, Directory d) throws IOException {
StackTraceElement[] stack = new Exception().getStackTrace();
Directory impl = newDirectoryImpl(r, TEST_DIRECTORY);