JAL-2110 work in progress
[jalview.git] / test / jalview / util / DnaUtilsTest.java
index 9e978fe..d7a76b9 100644 (file)
@@ -92,7 +92,7 @@ public class DnaUtilsTest
      * valid things we don't yet handle
      */
     assertNull(DnaUtils.parseLocation("<34..126"));
-    assertNull(DnaUtils.parseLocation("34..>126"));
+    assertNull(DnaUtils.parseLocation("35..>126"));
     assertNull(DnaUtils.parseLocation("34.126"));
     assertNull(DnaUtils.parseLocation("34^126"));
     assertNull(DnaUtils.parseLocation("order(34..126,130..180)"));
@@ -114,6 +114,19 @@ public class DnaUtilsTest
     {
       // expected
     }
+
+    /*
+     * nested joins are not allowed; just as well since this fails to parse
+     * (splitting tokens by comma fragments the inner join expression)
+     */
+    assertNull(DnaUtils
+            .parseLocation("join(1..2,join(4..5,10..12),18..22)"));
+    /*
+     * complement may not enclose multiple ranges 
+     * parsing fails for the same reason
+     */
+    assertNull(DnaUtils
+            .parseLocation("join(complement(36618..36700,4000..4200),86988..87064)"));
   }
 
 }