From: Jim Procter Date: Wed, 26 Jun 2019 10:55:26 +0000 (+0100) Subject: JAL-3330 test to verify sub/attributeName array is not shared between multiple instan... X-Git-Tag: Release_2_11_0~4^2~1^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=065aabb4c7dc81aed595099ae64e00be4055e89e;p=jalview.git JAL-3330 test to verify sub/attributeName array is not shared between multiple instances after copy-via-copy constructor --- diff --git a/test/jalview/schemes/FeatureColourTest.java b/test/jalview/schemes/FeatureColourTest.java index 52ca360..dae70f7 100644 --- a/test/jalview/schemes/FeatureColourTest.java +++ b/test/jalview/schemes/FeatureColourTest.java @@ -173,6 +173,13 @@ public class FeatureColourTest assertEquals(Color.yellow, fc1.getColour()); assertEquals(10f, fc1.getMin()); assertEquals(20f, fc1.getMax()); + + /* + * modify original attribute label and check that copy doesn't change + */ + fc.setAttributeName("MAF", "AF"); + assertArrayEquals(new String[] { "AF" }, fc1.getAttributeName()); + } @Test(groups = { "Functional" })