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 2007/05/22 15:17:37 UTC
svn commit: r540576 -
/incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/TypePriorityTest.java
Author: schor
Date: Tue May 22 06:17:36 2007
New Revision: 540576
URL: http://svn.apache.org/viewvc?view=rev&rev=540576
Log:
[UIMA-410] changed the test to have the commented-out checks check for proper ordering
of subtypes of those specified in the setup. Also reformatted the comment into a more
usable diagram (I think automatic source formatting on this file did the wrong thing
here). Test runs.
Modified:
incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/TypePriorityTest.java
Modified: incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/TypePriorityTest.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/TypePriorityTest.java?view=diff&rev=540576&r1=540575&r2=540576
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/TypePriorityTest.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/TypePriorityTest.java Tue May 22 06:17:36 2007
@@ -161,9 +161,12 @@
}
/*
- * Diagram to figure out what the answers should be a aa ab aaa aab aba abb aaaa aaab aaba aabb
- * aaba aabb aaba aabb aaaaa aaaab aaaba aaabb aabaa aabab aabba aabbb abaaa abaab ababa ababb
- * abbaa abbab abbba abbbb
+ * Diagram to figure out what the answers should be
+ * a b
+ * aa ab ba ...
+ * aaa aab aba abb baa ...
+ * aaaa aaab aaba aabb abaa abab abba abbb baaa ...
+ * aaaaa aaaab aaaba aaabb aabaa aabab aabba aabbb abaaa abaab ababa ababb abbaa abbab abbba abbbb baaaa ...
*/
/**
* Test driver.
@@ -186,16 +189,18 @@
order = irm.createTypeSortOrder();
LinearTypeOrder lo;
try {
+ // aaa (and all its subtypes) come before bbb (and all its subtypes)
order.add(new String[] { "aaa", "bbb" });
+ // aa (and all its subtypes) come before
+ // abaa (and all its subtypes) come before
+ // abbbb (and all its subtypes)
order.add(new String[] { "aa", "abaa", "abbbb" });
lo = order.getOrder();
check(lo, new String[] { "aa", "abaa", "abbbb" });
check(lo, "aaa", "bbb");
- // AFAICT, these relations do not necessarily follow from the type order defined for this
- // test case.
-// check(lo, "aba", "abab");
-// check(lo, "abab", "abaa");
+ check(lo, "aaa", "abaaa");
+ check(lo, "aaab", "abaab");
check(lo, "aa", "abbbb");
check(lo, "abaa", "abbbb");
} catch (CASException e) {