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 2016/05/25 15:45:41 UTC
svn commit: r1745504 -
/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexRepositoryTest.java
Author: schor
Date: Wed May 25 15:45:41 2016
New Revision: 1745504
URL: http://svn.apache.org/viewvc?rev=1745504&view=rev
Log:
[UIMA-4674] fix test case to force a null sofa ref for testing
Modified:
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexRepositoryTest.java
Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexRepositoryTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexRepositoryTest.java?rev=1745504&r1=1745503&r2=1745504&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexRepositoryTest.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/test/java/org/apache/uima/cas/test/IndexRepositoryTest.java Wed May 25 15:45:41 2016
@@ -30,12 +30,14 @@ import org.apache.uima.cas.Type;
import org.apache.uima.cas.TypeSystem;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSIndexRepositoryImpl;
+import org.apache.uima.cas.impl.FeatureImpl;
import org.apache.uima.cas.impl.FeatureStructureImplC;
import org.apache.uima.cas.impl.TypeSystemConstants;
import org.apache.uima.cas.impl.TypeSystemImpl;
import org.apache.uima.cas.text.AnnotationFS;
import org.apache.uima.cas.text.AnnotationIndex;
import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.cas.TOP;
import org.apache.uima.jcas.tcas.Annotation;
import junit.framework.TestCase;
@@ -72,6 +74,9 @@ public class IndexRepositoryTest extends
public void testMissingSofaRef() throws Exception {
JCas jcas = cas.getJCas();
Annotation a = new Annotation(jcas, 0, 4);
+ FeatureImpl feat = (FeatureImpl) cas.getTypeSystem().getType(CAS.TYPE_NAME_ANNOTATION_BASE)
+ .getFeatureByBaseName(CAS.FEATURE_BASE_NAME_SOFA);
+ a._setFeatureValueNcNj(feat, null);
try {
jcas.addFsToIndexes(a);
} catch (CASRuntimeException e) {