JAL-2038 fix tests for case insensitive eSequenceIdMatcher
authorJim Procter <jprocter@issues.jalview.org>
Wed, 1 Jun 2016 15:52:24 +0000 (16:52 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 1 Jun 2016 15:52:24 +0000 (16:52 +0100)
test/jalview/analysis/SequenceIdMatcherTest.java

index eb0fc47..9d3e3b6 100644 (file)
@@ -50,6 +50,10 @@ public class SequenceIdMatcherTest
     assertTrue(testee.equals("A12345,"));
     assertTrue(testee.equals("A12345?"));
     assertTrue(testee.equals("A12345_"));
+    /*
+     * case insensitive matching
+     */
+    assertTrue(testee.equals("a12345"));
 
     /*
      * matcher name = target name + word separator...
@@ -58,13 +62,21 @@ public class SequenceIdMatcherTest
     assertTrue(testee.equals("A12345"));
 
     /*
+     * case insensitive matching
+     */
+    assertTrue(testee.equals("a12345"));
+
+    /*
      * miscellaneous failing cases
      */
     testee = sequenceIdMatcher.new SeqIdName("A12345");
     assertFalse(testee.equals((Object) null));
     assertFalse(testee.equals(""));
-    assertFalse(testee.equals("a12345"));
     assertFalse(testee.equals("A12346|A12345"));
+    /*
+     * case insensitive matching
+     */
+    assertTrue(testee.equals("a12345"));
 
     testee = sequenceIdMatcher.new SeqIdName("A12345?B23456");
     assertFalse(testee.equals("B23456"));
@@ -74,5 +86,9 @@ public class SequenceIdMatcherTest
     testee = sequenceIdMatcher.new SeqIdName("A12345<");
     assertFalse(testee.equals("A12345?"));
     assertTrue(testee.equals("A12345<")); // bug? inconsistent
+    /*
+     * case insensitive matching
+     */
+    assertTrue(testee.equals("a12345"));
   }
 }