From: gmungoc Date: Mon, 4 Jul 2016 14:34:51 +0000 (+0100) Subject: JAL-2110 added another test case (should fail but doesn't) X-Git-Tag: Release_2_10_0~140^2~5^2~21 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=cf1d48fde41e88a6c05c8333f4e9e00459b0b4d9;p=jalview.git JAL-2110 added another test case (should fail but doesn't) --- diff --git a/test/jalview/datamodel/SequenceTest.java b/test/jalview/datamodel/SequenceTest.java index 5c5c5c3..71719dd 100644 --- a/test/jalview/datamodel/SequenceTest.java +++ b/test/jalview/datamodel/SequenceTest.java @@ -78,7 +78,17 @@ public class SequenceTest // change sequence, should trigger an update of cached result sq.setSequence("ASDFASDFADSF"); assertTrue(sq.isProtein()); + /* + * in situ change of sequence doesn't change hashcode :-O + * (sequence should not expose internal implementation) + */ + for (int i = 0; i < sq.getSequence().length; i++) + { + sq.getSequence()[i] = "acgtu".charAt(i % 5); + } + assertTrue(sq.isProtein()); // but it isn't } + @Test(groups = { "Functional" }) public void testGetAnnotation() {