From 8fafc5175547a6d8a38447cff309300b110a1637 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 6 Oct 2017 09:16:13 +0100 Subject: [PATCH] JAL-2738 unit test for mapping failure case --- test/jalview/util/MapListTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/jalview/util/MapListTest.java b/test/jalview/util/MapListTest.java index f3395ca..d2db258 100644 --- a/test/jalview/util/MapListTest.java +++ b/test/jalview/util/MapListTest.java @@ -931,5 +931,13 @@ public class MapListTest toRanges = compound.getToRanges(); assertEquals(toRanges.size(), 1); assertArrayEquals(new int[] { 47, 50, 71, 126 }, toRanges.get(0)); + + /* + * method returns null if not all regions are mapped through + */ + ml1 = new MapList(new int[] { 1, 50 }, new int[] { 101, 150 }, 1, 1); + ml2 = new MapList(new int[] { 131, 180 }, new int[] { 201, 250 }, 1, 3); + compound = ml1.traverse(ml2); + assertNull(compound); } } -- 1.7.10.2