You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2014/12/14 19:23:22 UTC
svn commit: r1645485 -
/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexComparitorTest.java
Author: schor
Date: Sun Dec 14 18:23:22 2014
New Revision: 1645485
URL: http://svn.apache.org/r1645485
Log:
[UIMA-4152] new tests showing surprising behavior of find and contains methods of FSIndex
Modified:
uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexComparitorTest.java
Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexComparitorTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexComparitorTest.java?rev=1645485&r1=1645484&r2=1645485&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexComparitorTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexComparitorTest.java Sun Dec 14 18:23:22 2014
@@ -252,6 +252,22 @@ public class IndexComparitorTest extends
return f;
}
+ public void testFindSubtype() throws Exception {
+ cas.reset();
+
+ ir.addFS(createFs(type1, 0, 0));
+ ir.addFS(createFs(type1Sub1, 1, 1));
+ FeatureStructure testprobe = createFs(type1Sub1, 1, 1); // not in index, used only for key values
+
+ assertFalse(sortedType1.contains(testprobe));
+
+ assertTrue(sortedType1Sub1.contains(testprobe));
+
+ FeatureStructure testProbeSuper = createFs(type1, 1, 1);
+
+ assertTrue(sortedType1Sub1.contains(testProbeSuper));
+ }
+
public void testCompare() throws Exception {
try {
assertTrue(0 == sortedType1.compare(fss[0][0][0], fss[0][0][1]));