JAL-1270 testToString added
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 4 Jun 2015 13:43:12 +0000 (14:43 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 4 Jun 2015 13:43:12 +0000 (14:43 +0100)
test/jalview/util/MapListTest.java

index f69fe40..bfb0837 100644 (file)
@@ -498,4 +498,15 @@ public class MapListTest
     assertEquals(prettyPrint(ml.getToRanges()),
             prettyPrint(ml2.getFromRanges()));
   }
+
+  @Test
+  public void testToString()
+  {
+    MapList ml = new MapList(new int[]
+    { 1, 5, 10, 15, 25, 20 }, new int[]
+    { 51, 1 }, 1, 3);
+    String s = ml.toString();
+    assertEquals("From (1:3) [ [1, 5] [10, 15] [25, 20] ] To [ [51, 1] ]",
+            s);
+  }
 }