+
+ /*
+ * nested joins are not allowed; just as well since this fails to parse
+ * (splitting tokens by comma fragments the inner join expression)
+ */
+ checkForParseException("join(1..2,join(4..5,10..12),18..22)");
+ /*
+ * complement may not enclose multiple ranges
+ * parsing fails for the same reason
+ */
+ checkForParseException("join(complement(36618..36700,4000..4200),86988..87064)");
+ }
+
+ /**
+ * Verifies that a ParseException is thrown when the given location is parsed
+ *
+ * @param location
+ */
+ void checkForParseException(String location)
+ {
+ try
+ {
+ DnaUtils.parseLocation(location);
+ fail("Expected exception");
+ } catch (ParseException e)
+ {
+ // expected;
+ }