From cf1d48fde41e88a6c05c8333f4e9e00459b0b4d9 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 4 Jul 2016 15:34:51 +0100 Subject: [PATCH] JAL-2110 added another test case (should fail but doesn't) --- test/jalview/datamodel/SequenceTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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() { -- 1.7.10.2