mirror of https://github.com/apache/lucene.git
LUCENE-1470: add proper dependency to contrib/build.xml so contrib tests can subclass LuceneTestCase; fixed small bug TestTrieUtils test case
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@723287 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1fb2d4f280
commit
05bff1833f
|
@ -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>
|
||||
|
|
|
@ -81,6 +81,7 @@ public class TestTrieUtils extends LuceneTestCase {
|
|||
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 @@ public class TestTrieUtils extends LuceneTestCase {
|
|||
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 @@ public class TestTrieUtils extends LuceneTestCase {
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue