From a64dc4fefdcb2447a3f0b09ddfdcb64392731c6e Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 5 Apr 2016 18:33:13 +0100 Subject: [PATCH] JAL-2046 test behaviour of copy constructor in different contexts --- test/jalview/datamodel/SequenceTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 1.7.10.2