From: Jim Procter Date: Tue, 5 Apr 2016 17:33:13 +0000 (+0100) Subject: JAL-2046 test behaviour of copy constructor in different contexts X-Git-Tag: Release_2_10_0~249^2~31^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a64dc4fefdcb2447a3f0b09ddfdcb64392731c6e;p=jalview.git JAL-2046 test behaviour of copy constructor in different contexts --- diff --git a/test/jalview/datamodel/SequenceTest.java b/test/jalview/datamodel/SequenceTest.java index b8a4b3a..24a63dc 100644 --- a/test/jalview/datamodel/SequenceTest.java +++ b/test/jalview/datamodel/SequenceTest.java @@ -518,7 +518,11 @@ public class SequenceTest // copy has a copy of the sequence feature: SequenceFeature[] sfs = copy.getSequenceFeatures(); assertEquals(1, sfs.length); - assertFalse(sfs[0] == seq1.getSequenceFeatures()[0]); + if (seq1.getDatasetSequence()!=null && copy.getDatasetSequence()==seq1.getDatasetSequence()) { + assertTrue(sfs[0] == seq1.getSequenceFeatures()[0]); + } else { + assertFalse(sfs[0] == seq1.getSequenceFeatures()[0]); + } assertTrue(sfs[0].equals(seq1.getSequenceFeatures()[0])); // copy has a copy of the PDB entry