X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Futil%2FMappingUtilsTest.java;h=853ebd5eed5d0056ebed320923bd2d03ea9b1be7;hb=b8058f3f849f44740a695c83e96bdca3a197af5c;hp=3c4d4f8f59dfbf926a2ee04c9c12a3390ac23d3b;hpb=3aa60eb1704441d7db522c13d6b45ab05cb43e2b;p=jalview.git diff --git a/test/jalview/util/MappingUtilsTest.java b/test/jalview/util/MappingUtilsTest.java index 3c4d4f8..853ebd5 100644 --- a/test/jalview/util/MappingUtilsTest.java +++ b/test/jalview/util/MappingUtilsTest.java @@ -858,61 +858,6 @@ public class MappingUtilsTest assertEquals("[5, 10]", Arrays.toString(hidden.get(1))); } - /** - * Tests for the method that removes the trailing stop codon from a mapping - * range i.e. the last 3 positions (whether split or not) - */ - @Test(groups = { "Functional" }) - public void testUnmapStopCodon() - { - List ranges = new ArrayList(); - - // simple case, forward strand: - ranges.add(new int[] { 1, 3 }); - ranges.add(new int[] { 9, 14 }); - MappingUtils.unmapStopCodon(ranges, 9); - assertEquals(2, ranges.size()); - assertArrayEquals(new int[] { 1, 3 }, ranges.get(0)); - assertArrayEquals(new int[] { 9, 11 }, ranges.get(1)); - - // split stop codon, forward strand: - ranges.clear(); - ranges.add(new int[] { 1, 8 }); - ranges.add(new int[] { 10, 10 }); - MappingUtils.unmapStopCodon(ranges, 9); - assertEquals(1, ranges.size()); - assertArrayEquals(new int[] { 1, 6 }, ranges.get(0)); - - // very split stop codon, forward strand: - ranges.clear(); - ranges.add(new int[] { 1, 1 }); - ranges.add(new int[] { 3, 4 }); - ranges.add(new int[] { 6, 6 }); - ranges.add(new int[] { 8, 8 }); - ranges.add(new int[] { 10, 10 }); - MappingUtils.unmapStopCodon(ranges, 6); - assertEquals(2, ranges.size()); - assertArrayEquals(new int[] { 1, 1 }, ranges.get(0)); - assertArrayEquals(new int[] { 3, 4 }, ranges.get(1)); - - // simple case, reverse strand: - ranges.clear(); - ranges.add(new int[] { 12, 10 }); - ranges.add(new int[] { 6, 1 }); - MappingUtils.unmapStopCodon(ranges, 9); - assertEquals(2, ranges.size()); - assertArrayEquals(new int[] { 12, 10 }, ranges.get(0)); - assertArrayEquals(new int[] { 6, 4 }, ranges.get(1)); - - // split stop codon, reverse strand: - ranges.clear(); - ranges.add(new int[] { 12, 6 }); - ranges.add(new int[] { 4, 3 }); - MappingUtils.unmapStopCodon(ranges, 9); - assertEquals(1, ranges.size()); - assertArrayEquals(new int[] { 12, 7 }, ranges.get(0)); - } - @Test(groups = { "Functional" }) public void testGetLength() {