lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r723287 - in /lucene/java/trunk/contrib: contrib-build.xml queries/src/test/org/apache/lucene/search/trie/TestTrieUtils.java
Date Thu, 04 Dec 2008 11:07:00 GMT
Author: mikemccand
Date: Thu Dec  4 03:06:59 2008
New Revision: 723287

URL: http://svn.apache.org/viewvc?rev=723287&view=rev
Log:
LUCENE-1470: add proper dependency to contrib/build.xml so contrib tests can subclass LuceneTestCase;
fixed small bug TestTrieUtils test case

Modified:
    lucene/java/trunk/contrib/contrib-build.xml
    lucene/java/trunk/contrib/queries/src/test/org/apache/lucene/search/trie/TestTrieUtils.java

Modified: lucene/java/trunk/contrib/contrib-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/contrib-build.xml?rev=723287&r1=723286&r2=723287&view=diff
==============================================================================
--- lucene/java/trunk/contrib/contrib-build.xml (original)
+++ lucene/java/trunk/contrib/contrib-build.xml Thu Dec  4 03:06:59 2008
@@ -61,7 +61,7 @@
   </target>
 
   
-  <target name="init" depends="common.init,build-lucene"/>
+  <target name="init" depends="common.init,build-lucene,build-lucene-tests"/>
   <target name="compile-test" depends="init" if="contrib.has.tests">
     <antcall target="common.compile-test" inheritRefs="true" />
   </target>

Modified: lucene/java/trunk/contrib/queries/src/test/org/apache/lucene/search/trie/TestTrieUtils.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/queries/src/test/org/apache/lucene/search/trie/TestTrieUtils.java?rev=723287&r1=723286&r2=723287&view=diff
==============================================================================
--- lucene/java/trunk/contrib/queries/src/test/org/apache/lucene/search/trie/TestTrieUtils.java
(original)
+++ lucene/java/trunk/contrib/queries/src/test/org/apache/lucene/search/trie/TestTrieUtils.java
Thu Dec  4 03:06:59 2008
@@ -81,6 +81,7 @@
 		for (int i=0; i<vals.length; i++) {
 			trieVals[i]=variant.longToTrieCoded(vals[i]);
 			assertEquals( "Back and forth conversion should return same value", vals[i], variant.trieCodedToLong(trieVals[i])
);
+			assertEquals( "Automatic back conversion with encoding detection should return same value",
vals[i], TrieUtils.trieCodedToLongAuto(trieVals[i]) );
 		}
 		
 		// check sort order (trieVals should be ascending)
@@ -112,6 +113,7 @@
 		for (int i=0; i<vals.length; i++) {
 			trieVals[i]=variant.doubleToTrieCoded(vals[i]);
 			assertTrue( "Back and forth conversion should return same value", vals[i]==variant.trieCodedToDouble(trieVals[i])
);
+			assertTrue( "Automatic back conversion with encoding detection should return same value",
vals[i]==TrieUtils.trieCodedToDoubleAuto(trieVals[i]) );
 		}
 		
 		// check sort order (trieVals should be ascending)
@@ -145,6 +147,7 @@
 		for (int i=0; i<vals.length; i++) {
 			trieVals[i]=variant.dateToTrieCoded(vals[i]);
 			assertEquals( "Back and forth conversion should return same value", vals[i], variant.trieCodedToDate(trieVals[i])
);
+			assertEquals( "Automatic back conversion with encoding detection should return same value",
vals[i], TrieUtils.trieCodedToDateAuto(trieVals[i]) );
 		}
 		
 		// check sort order (trieVals should be ascending)



Mime
View raw message