Skip to content

Commit df1f905

Browse files
committed
Pulling in the @josemduarte test case for issue biojava#355
1 parent 220f9ff commit df1f905

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package org.biojava.nbio.genome;
2+
3+
import static org.junit.Assert.*;
4+
5+
import org.biojava.nbio.genome.parsers.gff.Location;
6+
import org.junit.Test;
7+
8+
public class TestIssue355 {
9+
10+
@Test
11+
public void testIssue1() {
12+
Location l1 = Location.fromBio(51227320, 51227381, '+');
13+
Location l2 = Location.fromBio(51227323, 51227382, '+');
14+
15+
Location union = l1.union(l2);
16+
assertEquals(51227320,union.bioStart());
17+
assertEquals(51227382,union.bioEnd());
18+
}
19+
20+
@Test
21+
public void testIssue2() {
22+
Location l1 = Location.fromBio(100, 200, '+');
23+
Location l2 = Location.fromBio(1, 99, '+');
24+
Location intersection = l1.intersection(l2);
25+
assertNull(intersection);
26+
}
27+
28+
}
29+

0 commit comments

Comments
 (0)